/* called by: entrance ctrl of the object 'track'
/ e S$ S1 c1 P6 Z*/! G2 f" C8 A( d6 @1 |! @/ U0 q
is$ [. K+ j" K) w! a/ O- l$ z) B7 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ?1 {' P5 a3 Q. |
do
4 w( p W* t' _! G" ~% P Lan := rootfolder.Internal.Tools.AOLlanguage;
. `4 r- c9 i, E" M& E if current = @.Destination -- else return9 j2 e6 N5 L/ w( y: O: q; O
then
4 \6 f$ n- s; d7 E5 [. ^ z @.Destination := void;
1 Z; @4 Y& m5 l. P3 r" V if @.occupied then5 C. _+ p }+ w( ]/ ]/ `4 Y
part := @.cont;
4 w( f- s8 }$ g7 ^5 l0 u! b% \( N @.transpOrder := void;
$ M% n/ z( y# n" m, c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 U" e* x! I/ ?
@,root.eventcontroller.simTime);; k4 ]( W9 W6 `. r2 V4 C
@.HasOrder := false;% |3 @* A1 {1 }0 ^; |. }+ b E% Q# D
@.DrivingHome := true;
i3 a1 H+ d& e/ ~0 s$ ^! n rgManager.tryToStartTransOrder;' j! N7 G- n1 }4 w, x
if @.Destination = void
( w( C! T# n# Z4 } then -- no transport order for vehicle @
0 R e7 p: ~+ m* U @.Destination :=: P! P7 K& i1 M/ P% T9 {
rgManager.nearestFreeStation(@,track.~);
% U. q5 p; h: ?- N7 d5 C3 m! G newDirection(@); 9 P' b( g- q& B7 T6 k) h
if @.Destination /= void then
2 [; @; M3 E& u$ b @.Destination.NumReservation :=) r, g8 r7 A- E/ I
@.Destination.NumReservation + 1;
u' K& e; K0 u. m end;+ N O- ^4 W- f& y# B
@.CurrIcon := "drivingHome";
8 `" `" f- u3 p; J2 N! O @.DrivingHome := true;2 E" C' |! `- ]0 R- C" d
end;) Y3 Y Z8 g. {. ?+ n* @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- v) L8 _9 K! W9 O) N! W$ ~8 O
part := @.transpOrder;; K& R0 D/ N* M& {7 k- T
part.move(@);-- load part
" ^! G7 Q4 q1 `3 o3 ~1 [+ o6 K$ K @.CurrIcon := "load";# Q0 U" i7 J! D6 f3 }$ H
GlobalDistObj := part.globDestination;
8 o e/ `" R& b& G" C% ~ assignLObj := rgmanager.rgAssignL;
& n: |" o- w, m" F row := assignLObj.getRowNo(GlobalDistObj);, w. Q6 Y, }5 p, P1 P S. _7 [
if Row = -1 then -- since 70
0 w6 \7 _! L5 P( j if lan=1 then
# S* j" U6 D' F4 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: I5 f* Y7 q* J9 E6 P to_str("in der Andockstation: \"",?.~.name,"\""));
+ e" \/ x0 ]: I$ D8 m0 d$ E8 j else8 ~" C' M- Q" m1 K0 T5 S1 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 ]" s |. Y6 q to_str("in docking station: \"",?.~.name,"\"")); 7 R& I% V1 p4 d/ V) K7 F
end;4 d( _- R7 B5 s4 b7 v) v2 `# X
else
! S& b" T7 C' F @.Destination := assignLObj[1,row];
# |/ e$ o* ^. i* x end; . ^9 ^; P( U" e* J
newDirection(@);- p1 M S; y% j7 L( S& B3 p3 u
@.HasOrder := true;
1 s+ S! v# |; A+ ] \ end;
$ U8 b: r0 C1 {5 j0 _7 k end;
0 Z8 y* m3 G# P0 O8 Z3 R3 Uend; -- of the method
( d4 v# j4 Q. E( Y |