/* called by: entrance ctrl of the object 'track'
. |# n% [0 [: ~4 v# S2 w*/
. I% X* p1 f% P0 G+ R& fis
; Y6 X q/ v5 U/ S- l part, GlobalDistObj, assignLObj:object;row,Lan:integer;! Q' g& ~/ I5 j+ X- d4 R) K, M2 K
do
) Y3 b" p8 W( l# K; ~2 ~2 n Lan := rootfolder.Internal.Tools.AOLlanguage;- @9 h- `9 _! b; y2 f5 _2 \
if current = @.Destination -- else return. N7 U6 R4 r+ m9 c, G4 A7 p
then% ~2 c: T {# t2 j' P
@.Destination := void;6 L @6 p" @; z, I& ]
if @.occupied then3 G- W" Q+ Q9 y9 g4 t
part := @.cont;! A, [- _$ v+ e1 ?# }
@.transpOrder := void;
3 | n0 a4 D, b5 \; L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* x. U5 |% M; W# W$ J5 v% ]
@,root.eventcontroller.simTime);
) L9 t3 o0 i8 Y+ q2 s7 Y @.HasOrder := false;
F1 c5 q [' j0 z @.DrivingHome := true;, o7 L A6 D" T
rgManager.tryToStartTransOrder;! j. i7 Y6 W2 X, d @
if @.Destination = void
% V/ Y: W2 H0 a- d w' }) }7 L then -- no transport order for vehicle @. S& Y6 L# \2 p; ], o! G
@.Destination :=2 n4 F3 y9 }; F, W. W( ~- e
rgManager.nearestFreeStation(@,track.~);- h' |9 b; F9 E% T& g& w( q% W
newDirection(@); % u3 j8 |0 v/ f
if @.Destination /= void then
" a- N5 d3 O! T- U* x. Q+ V @.Destination.NumReservation :=
) o+ h9 n+ w# A" G; {: g+ j9 ~ @.Destination.NumReservation + 1;# c( t9 @: J5 b" s# b9 G j
end;, D7 O5 O* s3 T3 v8 ?- J0 }
@.CurrIcon := "drivingHome";3 k: |* g, \% ~8 c, X
@.DrivingHome := true;
( o- O+ D) R8 P9 U end;
+ i- U* Q2 T" N5 k' z+ T else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 a f1 r" g; b2 P% R
part := @.transpOrder;
+ u/ i; k7 X) g, k$ t part.move(@);-- load part
- {! t( F6 T/ q/ e6 l( ^ ` @.CurrIcon := "load";) k7 `5 `6 ?! Q& E4 n! ~
GlobalDistObj := part.globDestination;2 V+ f' V" L" t! l7 q9 Z
assignLObj := rgmanager.rgAssignL;- b1 ?* u N+ W9 Q3 L9 |
row := assignLObj.getRowNo(GlobalDistObj);
5 w. b6 F5 N4 y7 L. b if Row = -1 then -- since 70
+ s4 Z0 H- ^0 G- i! f2 s if lan=1 then
% ?8 J5 E) x0 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% X; n+ e' C2 p% r to_str("in der Andockstation: \"",?.~.name,"\""));# e0 H& c, K- U" K; D; {
else
" D6 {, s6 A8 g2 }) e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Y* s" o6 j' p" ^
to_str("in docking station: \"",?.~.name,"\"")); 7 M$ i7 u3 b) ?" i6 ]+ H
end;( ?& Z/ ]' W; h2 h7 m! c
else
# q4 @1 U" y; D# o! K/ {- P @.Destination := assignLObj[1,row];- H# c! B. }5 \8 Y- W& ~3 I2 O
end;
/ [4 [( i" m5 Y. F- ~/ ^ newDirection(@);
% f/ D6 l' p, d$ @0 } @.HasOrder := true;2 H P$ z( z) D# ^ J- X4 k
end;
& Z' V, @5 f7 R" `7 [0 v" G# ]( K end;
( M/ b+ w3 o# F9 ], @4 O0 X d2 Oend; -- of the method
! L( S: B4 O4 _' f( T8 C; Q# Z |