/* called by: entrance ctrl of the object 'track'6 N+ Q( ^* p, e, U/ \) U
*/
& e+ A* _* O' C9 k' nis# P$ m% c0 u5 m/ J/ x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 h* ~& S% Y3 s# l& y
do
. E) I& W" B7 ` j" J! \ Lan := rootfolder.Internal.Tools.AOLlanguage; A3 R9 v+ t: e+ A% V" K* J
if current = @.Destination -- else return" q( I) O, \* o
then3 x5 Q! C$ F4 o) E3 {4 Y3 l
@.Destination := void;
. Z: s! L/ ^* i0 Y6 k% y if @.occupied then
. S2 q- G; y+ Y part := @.cont;9 w6 c# q' D, B
@.transpOrder := void;
6 B7 S4 B N$ _* ?% o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% J, h) Q2 t3 e3 O @,root.eventcontroller.simTime);
1 \6 U/ j! K8 V/ h0 p) c- \ @.HasOrder := false;; H6 m* D% `; M+ E
@.DrivingHome := true;
; I8 X$ s( S) d( U6 R. ^7 i rgManager.tryToStartTransOrder; D, P% Z* G' v+ M5 Q8 P
if @.Destination = void0 N/ D" }, J# s' ^
then -- no transport order for vehicle @) E% o5 z4 g4 G' V6 S2 r
@.Destination :=
- F- }* @3 E! v1 K rgManager.nearestFreeStation(@,track.~);4 d2 F2 U/ ~2 K" e4 ]3 _
newDirection(@); 9 ^$ E( ^4 J ~9 }
if @.Destination /= void then* x+ I- R/ J* o- t8 l# R
@.Destination.NumReservation :=
' w9 W/ P* U2 p* n @.Destination.NumReservation + 1;+ F7 ]6 [7 d5 _
end;
9 K7 @# y% m3 o- c+ v' s { @.CurrIcon := "drivingHome";' g/ V5 K; t8 R' B/ h, N; t
@.DrivingHome := true;
1 O: S, S9 x5 j) |) ~- I/ A* g end;/ B% L0 p4 A6 n6 ^4 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( Y( u, z5 q T9 y
part := @.transpOrder;& C: E0 y6 a+ l2 q0 Z3 g% `: T: C
part.move(@);-- load part* Q2 p/ t4 {: [' \6 n# H* j: M, `- h
@.CurrIcon := "load";
; H i+ f; `9 P% I& ?' I. Q) z GlobalDistObj := part.globDestination;
, j5 N0 F5 X/ X5 j: m assignLObj := rgmanager.rgAssignL;2 F2 }; X# V% c# R+ X
row := assignLObj.getRowNo(GlobalDistObj);
6 E3 A) y3 P9 | if Row = -1 then -- since 70
1 K ]4 a7 V# S o) |+ Q3 n A if lan=1 then+ c! Q7 B+ T8 G+ V* k6 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 A9 X! w: t; W' S5 p! o8 O
to_str("in der Andockstation: \"",?.~.name,"\""));
G2 ^, D7 f/ n5 I$ L else
4 T* @3 X# V+ D. K" q# E0 U& y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! y- Q3 K+ h# x4 k8 ~. f# }" ` to_str("in docking station: \"",?.~.name,"\""));
( H: M1 g- N+ W- D2 L end;; @: b- F% l- p
else$ V% O! v0 [( u) I+ F/ U7 G
@.Destination := assignLObj[1,row];
' Y$ O$ A* b0 M& X; K. V. ]( i end;
* y1 Y) l# S# H/ H newDirection(@);
/ R! u0 x( W; o# x @.HasOrder := true;/ ^( U6 n7 ]% B ^
end;& d, p, u5 \% V$ C: N
end;4 Z: C4 Y3 }) Z
end; -- of the method
9 M$ O4 |; Z5 a3 Q1 Q$ [ |