/* called by: entrance ctrl of the object 'track'
2 E2 T* r' T8 t6 B D4 s8 _* u*/# M( H) {0 @; a
is7 O+ G9 P& _; K% M8 h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 L S) T' w4 V% {. Udo
' [9 G. v; c, Q. \1 Q Lan := rootfolder.Internal.Tools.AOLlanguage;# C. Q& H. z0 m# Y, q$ M" U
if current = @.Destination -- else return0 J% A! C( a) V
then
! N* v. P5 v8 }) ?/ G& x @.Destination := void;
' A& S& W8 V3 a; S1 W if @.occupied then7 [' Z$ }+ y/ N
part := @.cont;# t m/ E L+ U t
@.transpOrder := void;+ A6 p/ g6 ?8 v9 j, \0 G; ?! h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ?4 O) L/ S4 N, f. R/ G
@,root.eventcontroller.simTime);0 a3 l8 C4 h8 E, ~1 K5 u
@.HasOrder := false;7 ~! O, H4 D7 n# H
@.DrivingHome := true;
% C1 N$ r* N% [3 j% G' h# Q. Y# o rgManager.tryToStartTransOrder;. r ~8 x: }0 A7 T9 G
if @.Destination = void) u" F3 v+ N8 k4 V2 q& O8 _
then -- no transport order for vehicle @
5 X! v3 g4 ~: V! @2 L: B @.Destination :=! i$ A# q% g1 F8 T- x6 V$ V
rgManager.nearestFreeStation(@,track.~);+ }6 Q" A! A G, Q; }. C& ^2 n8 `" f
newDirection(@);
( ^" H- ]) W7 | s) L2 u4 ], ^# { if @.Destination /= void then
3 ]7 H3 x$ M3 v! D @.Destination.NumReservation :=
# B3 q5 K* n) ]4 f% g, d5 `1 J @.Destination.NumReservation + 1;, _3 }' ?+ x) r2 r7 z( \7 U
end;
t1 }& F$ ~8 s/ F" L @.CurrIcon := "drivingHome"; s: r7 D2 k4 c: I. }# Z }" \
@.DrivingHome := true;% u. ~! W( R5 c& F" w3 D9 w
end;
; v$ ]" ^- L! \/ _+ x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
i3 \* {) ?% G5 ^. a part := @.transpOrder;2 K8 R4 b* B" S' \& i
part.move(@);-- load part$ W8 E) ?+ m4 C" w
@.CurrIcon := "load";6 v% E$ t' H) W, y8 ^8 y
GlobalDistObj := part.globDestination;. j6 `6 j' o$ F
assignLObj := rgmanager.rgAssignL;) d0 h0 `( s* u6 B8 d
row := assignLObj.getRowNo(GlobalDistObj);
% J" @, S% V+ z z4 l l" } } if Row = -1 then -- since 70 g8 \2 \( i) k3 K
if lan=1 then9 }8 Z6 g. n# ]6 n' z% z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; E" i5 l6 @3 ?0 a9 {
to_str("in der Andockstation: \"",?.~.name,"\"")); c. S4 `6 w! {
else: N4 ?' e4 }+ e- s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 R# }! l, w2 p to_str("in docking station: \"",?.~.name,"\""));
( g, u6 j% f! g5 p9 S2 v& w end;- p2 v1 f; i/ {) I( @0 {1 u- ?
else
" P; B: G1 R3 h) z* X @.Destination := assignLObj[1,row];' e1 G/ y4 o7 Y+ e
end;
( Q. ~& H) q) K2 e% r newDirection(@);% Q) l% w2 y# p2 L: t1 Y9 x8 M
@.HasOrder := true;5 D/ |& |0 F1 h
end;
/ _( h7 r2 i6 y/ ~5 a) G7 e end;! }- D/ ^ |- t3 }. X4 [
end; -- of the method
0 }5 {6 p) p: H+ U |