/* called by: entrance ctrl of the object 'track'
1 R. t% H( T, {7 B/ M; g4 k5 J' a*/; G2 O0 I& S F8 x8 ~
is
' ?% c B# L. b& Y' y' D& A part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( e1 c% [: `( P5 k6 s1 Zdo
1 y$ m, t. @8 D! x# l Lan := rootfolder.Internal.Tools.AOLlanguage;
1 p4 I3 `) j6 { v& o" c$ m+ j if current = @.Destination -- else return+ ^; t3 P% D$ o$ j8 _6 `7 e" J
then
6 v: v- {, u2 O* y @.Destination := void;
2 P7 j4 y% V5 a5 s7 @! G3 U" M( J if @.occupied then
8 u" m2 {. O; y2 M7 d- l part := @.cont; Q! H( D" Z* `8 O u f9 o4 p+ n
@.transpOrder := void;
N& R% |! v/ E) x# Y2 i4 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 G6 l& }! t; L
@,root.eventcontroller.simTime);
/ h v+ {- b- m5 c @.HasOrder := false;
# j# v2 `+ c: ~9 B) a/ w @.DrivingHome := true;6 z* W' W7 S5 r \: W9 \, s
rgManager.tryToStartTransOrder;
% n3 X' g+ Y( Y* z5 u# l1 x if @.Destination = void2 O3 Y, M" |2 G- I( O3 @$ a( c
then -- no transport order for vehicle @
: D+ F& X1 y1 J3 M- q. W @.Destination :=1 \# F1 d- y7 f& I6 q: Q& t
rgManager.nearestFreeStation(@,track.~);9 m; ~8 q: B9 A" O; c
newDirection(@);
" ~3 {$ }0 _' u8 \5 `" `% y if @.Destination /= void then7 v2 a7 [+ u- K$ v8 Z- H
@.Destination.NumReservation :=8 C; m! ]% c) u4 F+ J# t
@.Destination.NumReservation + 1;3 B2 ]' K" o6 s1 [1 j1 y& B
end;) O/ S2 S5 K% {
@.CurrIcon := "drivingHome";+ R6 Z; |: J* D8 n
@.DrivingHome := true;
$ e1 e. G9 f6 e/ o) Q4 t; b end;
3 T9 [' X$ {0 h8 j6 j) v6 @' S else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n9 x% J# ]- m; [' V$ E
part := @.transpOrder;! u7 Z; f, D* b8 i& a
part.move(@);-- load part7 K. a. Y0 D5 a- V. h( P) y) h
@.CurrIcon := "load";* l1 [5 K' m _2 R9 A% m
GlobalDistObj := part.globDestination;5 H* M( |- w0 |# o" G
assignLObj := rgmanager.rgAssignL; f/ U# t$ ^% L0 M
row := assignLObj.getRowNo(GlobalDistObj);6 c! ^9 s) g: K1 k9 Y9 j
if Row = -1 then -- since 70
. S" q0 x$ E l! ~ if lan=1 then
- i5 `' u1 L4 e' N# e$ R6 Z- e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( q. a/ s: A9 A h
to_str("in der Andockstation: \"",?.~.name,"\""));
( F( r: k0 h r' b4 E6 y else& N6 L# Q$ |, b# k/ C9 P' e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 q; c% u8 w- F# D) O3 [# ] to_str("in docking station: \"",?.~.name,"\""));
9 f4 b s5 C7 P, |6 D" O end;3 i& D K% S! K" D; K
else
. z' b2 z4 }: [5 g+ \ @.Destination := assignLObj[1,row];
$ ?# t" i$ [: G3 _$ } end; l9 F/ i6 I& D# D
newDirection(@);
1 c8 y& ? [6 I/ W5 } @.HasOrder := true;
3 _3 q' r+ X7 y# a; p) \ end;6 m! R: p. N" W$ F3 H0 O& x
end;
( K6 I3 v, P Oend; -- of the method
) \% l" J, d3 n: W& |& ^, @5 t, } |