/* called by: entrance ctrl of the object 'track'
@4 J% R/ f" r*/2 M. C- v5 |+ ^! j. F6 w
is( u' K+ c7 F/ ~& m8 e" f" z7 J% X4 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- \+ |$ v. U- ~" S
do4 m, [7 e3 j/ n3 e: \ `% H: R$ U
Lan := rootfolder.Internal.Tools.AOLlanguage;+ k1 o; D1 a8 w. Z
if current = @.Destination -- else return( }1 L8 i8 M3 D Q W
then( Y% S- G9 |- A K- B
@.Destination := void;
. f# V& v& p; v! T+ |# Y# M0 ^ if @.occupied then& }) i0 h! c ]/ C
part := @.cont;
0 e+ G2 H5 j5 e @.transpOrder := void;, z" t& ^" G9 S& S- ?$ v$ q' R. b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( W" ^# ?+ _2 S4 {/ P+ _ @,root.eventcontroller.simTime);
@ N8 l8 o" O5 e# ~ @.HasOrder := false;
. c- d; R% Z* E: i. X1 r @.DrivingHome := true;9 t+ R0 S) @ o, ]+ D0 @% }+ d
rgManager.tryToStartTransOrder;
. p7 |$ @. y. D# N; t if @.Destination = void( g& L' h7 O4 v4 z
then -- no transport order for vehicle @* ~/ e, o: I( D- A9 [
@.Destination :=1 D! D* @6 Z. d7 J9 z/ ~& W
rgManager.nearestFreeStation(@,track.~);' _: h F% H% _, N
newDirection(@); " N" p/ b% V+ C& k
if @.Destination /= void then0 H) p) u6 M+ x$ ?1 x
@.Destination.NumReservation :=
) J8 I! M8 R! x3 ~) p9 s' @7 b) F @.Destination.NumReservation + 1;
- B- s5 }' t8 L# e: ~% K* D end;: z1 C. f; I. s$ S: ~9 Q! M
@.CurrIcon := "drivingHome";
" I; b C7 v7 ^8 E @.DrivingHome := true;5 E9 w+ r+ g# F$ J$ n5 z. H+ l
end;% R+ u& @6 Y+ Z+ X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' e( ~1 }' h- H) ?6 L$ s part := @.transpOrder;% n& b# P3 g' T4 E0 |+ `, s4 b
part.move(@);-- load part; \7 b& Z) Q/ E, t) u
@.CurrIcon := "load";
( `5 O' X$ b$ L: R6 ]$ C) c6 ^ GlobalDistObj := part.globDestination;
( K, q! Y; K& ? m assignLObj := rgmanager.rgAssignL;1 ^& f) @1 s0 F
row := assignLObj.getRowNo(GlobalDistObj);
1 g1 M8 `. v( T if Row = -1 then -- since 70& x- y" T. I: M, O I
if lan=1 then7 V, x7 g$ Q" q* L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 `$ `: T) V) f: A) Y v$ N1 ~% K, J to_str("in der Andockstation: \"",?.~.name,"\""));% \) `; g/ E) s8 G7 S ~, Q# }3 k
else
/ P6 B2 Z- B1 c, J1 m: W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 s# W# U1 i- w0 z! Z+ Z. i* q to_str("in docking station: \"",?.~.name,"\"")); / e" A8 \6 }5 |% @' \
end;5 {" x0 I9 G% v) f) n) R: J
else N7 }- p# t' J* @ R- G" x# t
@.Destination := assignLObj[1,row];5 G' a+ Q C; o# ~6 _7 q1 J/ e
end;
4 X; a' m0 A1 p newDirection(@);
) C4 S: i4 q N0 u* s @.HasOrder := true;
* { a) s3 {: O' ?/ u. m( C3 R$ q end;
4 O9 {. f6 P+ |- F2 \0 h5 f3 ? end;" \3 u* h% C$ X8 S1 F9 L% t/ F
end; -- of the method
& g- F- ]$ a2 | |