/* called by: entrance ctrl of the object 'track'3 U) U5 h: {* ]; t {
*/6 l* i D/ M. ]
is; P, b, D% D x$ F2 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 C. J/ v3 B' S) a- o" \2 h" z7 r
do
1 z7 P* i$ \# l! l' n5 v) [* y Lan := rootfolder.Internal.Tools.AOLlanguage;2 p. f. O! d2 U8 d, o
if current = @.Destination -- else return
' ?0 G2 R: V# ]# m7 m' i$ G then
5 Y5 P7 r3 W; k, [* e @.Destination := void;1 k- B" r! C3 p- b$ D' Y% R/ U
if @.occupied then8 R" V2 j) ~+ ~$ j5 D0 }
part := @.cont;* N8 f& z! q0 h/ A Y* t `
@.transpOrder := void;0 |! L$ G5 D0 I1 v( S3 w# Q! S0 B3 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) F+ d4 Z# k* W r, B2 x* q" [- G @,root.eventcontroller.simTime);
; v, ^, [: u4 @$ X3 u @.HasOrder := false;
, y4 O9 ]8 \( C3 t4 c1 l8 g7 m5 R @.DrivingHome := true;
, ~; w- i) y. b. f* y4 K9 a rgManager.tryToStartTransOrder;! M# h: ~+ ~1 m9 S" ~
if @.Destination = void) s/ A0 }& M! B0 H
then -- no transport order for vehicle @# I0 j7 X0 t1 M& q
@.Destination :=4 K2 m% Q! G2 `3 M- r; R- c7 Z" Q* b
rgManager.nearestFreeStation(@,track.~);# W; X8 D: S- f1 @* U: A; V
newDirection(@);
! F% A# c e! V3 Z. x! d! r if @.Destination /= void then
! T1 B0 Q0 }" R5 w4 | W' h @.Destination.NumReservation :=
% O" w# T, d' e3 W @.Destination.NumReservation + 1;8 U6 [* S6 ^' o& y6 ]( q1 Y0 @
end;8 I. }. C* g, E
@.CurrIcon := "drivingHome";) B q, l; ?4 b' K5 s
@.DrivingHome := true;
/ u( o, M3 P5 y- u+ b* Z end; ]* a7 S7 Y2 p$ I6 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. F1 }2 k' x1 g) W" [* P part := @.transpOrder;
, N" t7 g. Z, e part.move(@);-- load part
7 r+ ?" K/ E& l+ z) v; R8 j$ l' v @.CurrIcon := "load";
6 \( Z6 Y$ B1 D" r* ] GlobalDistObj := part.globDestination;
# S: ~9 R# C7 j [ assignLObj := rgmanager.rgAssignL;8 k/ Z) |) J0 _" z8 `
row := assignLObj.getRowNo(GlobalDistObj);
7 _# F# n7 c2 t9 M6 [* Y' D if Row = -1 then -- since 70& j" G5 _1 Q, b& v* K
if lan=1 then
9 D6 [" @- B- d3 s4 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 I$ O7 t! M2 X P# g' e9 o& n to_str("in der Andockstation: \"",?.~.name,"\""));- v: m& U" M, P$ O9 }7 n, q
else$ w) I" `$ }: z' D0 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ g4 L I6 k- Q) |! r* S
to_str("in docking station: \"",?.~.name,"\""));
; q: G) Y' T! R" X end;
' T9 A6 d7 v! i4 v8 r5 K; ? else! h6 ~0 W( D5 ^$ B
@.Destination := assignLObj[1,row];- ^/ s6 |% M4 I5 X7 r. {3 e8 p
end;
# u! w# G% S& W- J1 x! K newDirection(@);
8 p3 x( W2 t+ G& O1 W. X$ s' n @.HasOrder := true;
6 ^1 ^- R# ^4 F3 r% I end;
; }; e$ r, W. A6 X/ K8 b- I end;" S; Y8 C/ @0 ]2 k& ^- x
end; -- of the method
6 l" m; o& J* Z. N) s* s1 J8 ] |