/* called by: entrance ctrl of the object 'track'
2 J2 D% T; ~) e8 V' o*/
; L) ], g/ o; {: N3 T- nis7 {" _8 X2 M; U* {* a0 C, U; V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 t& L7 `3 }( C5 M( Vdo
B g2 K5 h! S Lan := rootfolder.Internal.Tools.AOLlanguage;" @9 m1 S+ Y+ B
if current = @.Destination -- else return& \& P, k3 s4 [. j% Q6 Z) Z4 w" N, J
then
5 V* j7 b( b* n* s" y. ?' k @.Destination := void; v1 E' a0 y, K2 C. K5 |; H' [! E
if @.occupied then
5 e1 h* N" N# s5 L) e part := @.cont;
" V+ `3 K1 t" }0 _ @.transpOrder := void;
9 ? A8 ^# i, t- v9 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 N$ r) U6 S9 M& r: S
@,root.eventcontroller.simTime);
@) Z8 m- m. [ @.HasOrder := false;
2 u: ?) g4 x& D2 |+ T" h6 S @.DrivingHome := true;: j2 |8 _) h, J: S/ d, V: \5 ~
rgManager.tryToStartTransOrder;
) p* E. ?2 [8 C1 u! R, ]: o if @.Destination = void
2 g6 E- _9 B1 I% X; G0 u3 a r0 g2 W then -- no transport order for vehicle @
+ G( o8 t1 o- q; r @.Destination :=" }$ A0 [% i4 t/ l3 Y
rgManager.nearestFreeStation(@,track.~);5 ~) T6 h& k O7 r- S2 u
newDirection(@); 5 V# Z- v. o, j* H" ?) t$ a
if @.Destination /= void then' w8 u0 R; j5 D4 \2 q0 n# I. N
@.Destination.NumReservation :=
7 Y& _; `0 @5 N @.Destination.NumReservation + 1;% f) ^1 F; S' Q
end;
, i2 P1 a4 B8 {, x9 K# x @.CurrIcon := "drivingHome";
* D8 W* f. m! H3 |$ ~" a2 z$ L+ Q2 { @.DrivingHome := true;) _6 M: k P) L# G1 n! `: {9 o
end;! G- e5 G1 ?& i/ q' L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ?8 ~( L! ?( D: c5 x2 I' l3 T part := @.transpOrder;3 ?3 B& j7 I/ q. \% G5 g
part.move(@);-- load part
# o: A9 G' x3 z G x" T @.CurrIcon := "load";" D' j- f) d1 ~+ m, _9 x, _
GlobalDistObj := part.globDestination;
& ~4 o9 s. T, N! M7 I assignLObj := rgmanager.rgAssignL;
6 \6 `% m; ]4 H8 o! a1 w; ~, z& n row := assignLObj.getRowNo(GlobalDistObj);& D3 k h8 b7 \, \
if Row = -1 then -- since 705 l% Q. Z2 B% c" E
if lan=1 then
) j& j. w4 C5 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& z6 Z' t! p' o# ]7 l& Q! T- g2 @5 Q to_str("in der Andockstation: \"",?.~.name,"\""));( }# |6 Q- L' E6 P& v) V
else6 e# [; }. ]! w" j* a! @0 k" S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! G3 D7 o. b' ]! I3 q% g to_str("in docking station: \"",?.~.name,"\""));
( w3 v" ? S# A$ D5 K' t! g end;
& Q8 w K/ W; _2 R; A else6 R a6 t# o9 p
@.Destination := assignLObj[1,row];
2 T: [7 R$ q8 q2 U% T end; 2 S2 f, {# k2 M r
newDirection(@);) J9 v3 R# Q+ M( F/ k$ P3 T3 w
@.HasOrder := true;) G5 Y- K) `% E+ c
end;0 l2 O! {& ^. `! K2 m
end;* G/ x1 [ ]/ `, n% A9 d7 g% t) m
end; -- of the method! i! M2 `! c L
|