/* called by: entrance ctrl of the object 'track'
& M! `1 q# X9 G*/
/ r. k& \* L, }4 F( g5 O; ~is B* y9 ?. K1 d/ | Z, a- e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: O# E2 P2 W5 N; U6 Y5 ado
- f- A' J' M9 o9 b3 i; ` Lan := rootfolder.Internal.Tools.AOLlanguage;
5 p; Z* v! D- R# E; | l if current = @.Destination -- else return
+ ^4 G$ V F( W6 z then' z/ c+ H- X( q$ C7 J6 ~
@.Destination := void;
" f" P+ v X6 y- Z- G. H* t! v if @.occupied then
- i9 _; C* n4 j; |4 f- } part := @.cont;+ K# ]6 L A n$ G! D' z* c/ h+ x
@.transpOrder := void;' u' D/ S% O! z, A2 z: b6 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 A5 D! D7 {- y2 X& w/ [# H4 G# P @,root.eventcontroller.simTime);
1 D* Z7 b7 H9 B, B& a5 m+ v8 C% Y @.HasOrder := false;( b9 h* {$ [4 B) i
@.DrivingHome := true;
; V& n; Z0 K$ U( _ rgManager.tryToStartTransOrder;
) z) I2 \3 F" P9 l" [& J if @.Destination = void7 j& y! x4 N$ f
then -- no transport order for vehicle @
7 ~- r/ Y/ k' Q) ^. ~ @.Destination :=% z, V4 B! @3 f. r/ ^3 _
rgManager.nearestFreeStation(@,track.~);
6 ^% K. B8 i. ^% E. ? newDirection(@); r7 h$ H# C; M* u
if @.Destination /= void then4 I$ d: I0 h) C3 ^* e2 m
@.Destination.NumReservation := n. I! |& [4 x
@.Destination.NumReservation + 1;
( v: h) L- @ F2 j1 i8 w end;8 s4 [ ^4 A% p- E' ]! x
@.CurrIcon := "drivingHome";
- L! U* t; m$ H! F( Y. w5 Z+ B @.DrivingHome := true;, C1 m' L$ A6 G% N$ y% [
end;
0 A- q) {% R1 h7 N* V+ X else -- the vehicle @ is empty, both vehicle and part are in the same dock station- N: b' ?0 r# `/ ], ~
part := @.transpOrder;
, B' N! l4 M: Z9 \. B0 u+ ~4 X part.move(@);-- load part
8 y( _5 T- }& S) V4 R G @.CurrIcon := "load";
) h: M3 L% A2 M" R' e GlobalDistObj := part.globDestination;: B: X( b! v3 F" W
assignLObj := rgmanager.rgAssignL;
3 K" E; s# J9 p! f6 X3 z row := assignLObj.getRowNo(GlobalDistObj);
1 ~4 l) h/ w# f+ k' e) E if Row = -1 then -- since 70/ n/ H3 h& J1 Q3 M
if lan=1 then
1 b9 {1 R& V9 t; b% x7 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; L. \* u" R8 v( N; c+ @ o
to_str("in der Andockstation: \"",?.~.name,"\"")); E6 V. |. c% J# L) c6 Q6 c5 s
else8 B! B0 _% {+ z4 Y/ p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 r& X; _% Z2 c' C$ B
to_str("in docking station: \"",?.~.name,"\""));
) l' ]+ u. ~4 q2 g1 x6 U$ |& W, M end;
' M# ~4 V' j, X& y6 p2 o5 f: Z else+ H+ f' ~) s% u @# T$ L
@.Destination := assignLObj[1,row];; Q. u8 L: b) h! [$ r1 f- i, _
end; + c4 S: Y |! a& S3 X4 c
newDirection(@);
/ W1 e8 \/ m G" [ @.HasOrder := true;
/ Z2 G1 s2 Z# _% M end;* t* T5 |) ], T$ M: x- X" k
end;- h" [5 `. W6 Q3 K) U# ^! c# k) ^
end; -- of the method
) f; o: `4 x/ Q6 r% i, ~ |