/* called by: entrance ctrl of the object 'track'- g2 s$ ]" S" Q
*/
; B; A+ ?1 v$ S- mis
1 i7 j! o1 U( F# r, `9 v& b; @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 P7 @$ o$ m( G
do1 {) E; z; T) _7 k1 b7 C J
Lan := rootfolder.Internal.Tools.AOLlanguage;, T% l4 u5 f. D$ ^9 F
if current = @.Destination -- else return! i5 U( e- P- B$ Z
then% V: x4 ]0 R% a
@.Destination := void;
; Q- Q. R( Q/ O8 e if @.occupied then
# z# u3 `& l) M! B1 Z8 L" c) j part := @.cont;+ {5 u$ G% i$ Q# q1 l: U. m* X0 R
@.transpOrder := void;
% k, p. P* ^1 h6 W& A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ o" V5 \3 F V8 T! W @,root.eventcontroller.simTime);$ O2 s4 G/ Y0 D& r& x) e. i; w
@.HasOrder := false;
. ~2 u1 U, |* @7 x! l2 W @.DrivingHome := true;
. r8 H1 Z8 i/ K. B rgManager.tryToStartTransOrder;: r3 w$ g! U1 Q* k( p) o* t
if @.Destination = void- A+ s, u4 a' I4 h! C$ Z
then -- no transport order for vehicle @
2 A% X' q4 H- R @.Destination :=9 { {) o) \& }6 c
rgManager.nearestFreeStation(@,track.~);
, f9 P/ E8 P5 ]4 H/ \/ Y- N newDirection(@); * U# X7 O8 [4 t* W8 S' `/ ~4 O
if @.Destination /= void then
" ]7 k4 h7 u; f* o @.Destination.NumReservation :=
. j+ ^: D' p+ V" f1 n9 C @.Destination.NumReservation + 1;1 T( e k6 Q6 t7 k+ b& N9 \
end;) C$ [+ }0 ~$ Z! z- K& E0 W0 F% N
@.CurrIcon := "drivingHome";
/ D: N* D# B) r @.DrivingHome := true;
/ G0 l) w5 s9 A7 x end;+ A; `/ ?& Z# v7 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) O# H( I; v8 P
part := @.transpOrder;
5 `' V4 j& G( `; W, R1 k" b: h0 Y; x part.move(@);-- load part6 X( J: H I& P) z+ q
@.CurrIcon := "load";% |& L" C' v. _' B7 \
GlobalDistObj := part.globDestination;/ h. A8 d+ h5 `. L+ E4 F
assignLObj := rgmanager.rgAssignL;" O* T& I2 Y/ ]0 `* l# V( ^3 Y
row := assignLObj.getRowNo(GlobalDistObj);) i4 i& R m1 O% I" y! P' u
if Row = -1 then -- since 705 x# [; w! B8 q
if lan=1 then3 r G" ?4 G- b0 U: G+ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 g& [' J9 M$ f3 c to_str("in der Andockstation: \"",?.~.name,"\""));
/ w1 X$ K( P% ~2 F* l# \ else: @# S+ ]9 R9 _! i, W" U% ^9 F! d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 K: D* O. z7 E% m# j3 X- J/ o9 B
to_str("in docking station: \"",?.~.name,"\""));
$ W% p) Z( e& D( A/ \ end;9 w4 ]% k* Q$ W( i- v. D0 I
else" C3 b5 ~7 z% Q+ r
@.Destination := assignLObj[1,row];
2 }, N$ S! r9 s* z- h d3 T1 n$ O end; # r# J3 ?7 t* B# u0 [2 ^
newDirection(@);
7 P% y' C+ x( i( B @.HasOrder := true;1 Q( e4 K) n, w+ T/ [ U. d# k* m
end; G% Y# q& N" k* I) x. e
end;- \8 i$ l* }' H! o
end; -- of the method6 I9 _; t, y4 r3 h2 c
|