/* called by: entrance ctrl of the object 'track'
! `6 X N/ `2 h9 b*/1 u& Y1 K/ r t' B( X, U5 K5 F3 ^
is
& R% `7 k! a! d+ } part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ H1 h0 R1 n' c2 N: X- I- C
do! x5 b! K+ O, n. K5 D u( `. z
Lan := rootfolder.Internal.Tools.AOLlanguage;
) n' K' M {7 m1 `* q; O& h if current = @.Destination -- else return! p8 y5 Z/ ^$ H5 F0 V. l
then9 X% y; k+ G! `2 |, T) d
@.Destination := void;
) t4 D/ |. e2 m; Y/ E if @.occupied then
$ J9 \' `, e# h0 t; j part := @.cont;: l1 f, R, R. J2 A! E3 O
@.transpOrder := void;( K2 Y1 y. h# w/ n: C4 p9 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 M5 g5 O6 | s! I0 d @,root.eventcontroller.simTime);1 T4 ^7 o+ N% l
@.HasOrder := false;/ G3 a1 e: d; A5 J s% N) A3 Q
@.DrivingHome := true;
- }( W/ l# r" z9 W rgManager.tryToStartTransOrder;
7 b& l- D8 U( q" R# U* L7 P8 _* j if @.Destination = void
9 R- q* o6 t, t" c% T; b( ] then -- no transport order for vehicle @
- S$ [( i G7 f( E @.Destination :=7 u9 `. Z! ]- l0 c; s L
rgManager.nearestFreeStation(@,track.~);. K) Y* V. h( G9 G; d
newDirection(@);
* ?% S; q; v9 g9 w& Y. w: C if @.Destination /= void then( Y. b6 l, C. c" r( N I3 I
@.Destination.NumReservation :=3 p! j: Z1 x, A9 e0 O
@.Destination.NumReservation + 1;
0 c; b5 H, T2 P+ ^6 k! k- p1 a end;% L: L* ?' N5 I3 E0 j
@.CurrIcon := "drivingHome";
/ H5 L& E" _) g @.DrivingHome := true;
; V5 F/ r% T8 K7 g" h* q; i/ `4 \& _ end; r- I$ V) S6 h, q% O8 S2 h7 ^& R& K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! b' j8 s% {* F/ ~ j. K) U5 z part := @.transpOrder;
5 b& r% t' X1 G part.move(@);-- load part
6 r" Q% p( v# A$ U8 S. g; I' | @.CurrIcon := "load";
* a" Y u! D3 a4 D GlobalDistObj := part.globDestination;
; d# C1 a/ c0 U- {" m' b U assignLObj := rgmanager.rgAssignL;
3 T8 r" F% T4 x+ @ row := assignLObj.getRowNo(GlobalDistObj);
2 A. o' ~# W/ `) s5 p if Row = -1 then -- since 70 C4 a6 \3 [& N4 T% V
if lan=1 then
L. x2 K b' I; p' t8 a) v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 u K# e$ }/ Y/ g, F5 T, s2 M
to_str("in der Andockstation: \"",?.~.name,"\""));
. W" d, {/ S" _" m0 b$ u0 p) D2 H else
$ g$ Y" n- e3 c6 j2 l/ ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ]% G6 R/ h; M5 l/ p
to_str("in docking station: \"",?.~.name,"\""));
% d: W! k9 ?$ `. u$ B6 F' B end;" @# m: O8 N7 j/ _2 V ]# P
else
2 O/ V' \# h2 O1 [6 j! G) A @.Destination := assignLObj[1,row];
* H, @& x$ g9 @ end; 2 Z' C# k; K( C! r% G3 }
newDirection(@);- d9 M( x3 z6 [: r' X
@.HasOrder := true;
! ~8 g6 p+ V7 J; ], R+ s4 p! Y1 N+ o" d0 r end;
7 N0 |) X8 i3 U; o7 M! ^ end;; K U- S3 a& O- z+ j: y) ^% u* K
end; -- of the method
9 U% v& k5 j1 G; O1 a$ R1 o |