/* called by: entrance ctrl of the object 'track'
) Q; D6 e) z! X! ^. ], o" j& C*/, @% v0 Z+ o+ ^% A5 [" \$ v! L
is
5 K0 f0 o" _, Z. b" K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( J+ a4 F" C( Z$ {1 Fdo% `8 T: _9 ?+ \
Lan := rootfolder.Internal.Tools.AOLlanguage;
: T) C4 J* n' r# j- U$ o7 N if current = @.Destination -- else return* [& o& D# {# U7 v
then
, y+ I+ j: G3 {5 L% L: @ @.Destination := void;; z- |! I# i( m
if @.occupied then1 [/ V% P3 L) r- Z! U
part := @.cont;
( i" W: c7 g- B! U, E+ r) r* y @.transpOrder := void;( W; n9 g2 z6 L1 _( p# q a# f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 e& v% A; M! o @,root.eventcontroller.simTime);0 E; b% T2 ^, s: m3 F# _3 {9 a
@.HasOrder := false;% V8 \) ?/ u6 L7 [1 U4 T
@.DrivingHome := true;$ A: c) m8 m- H
rgManager.tryToStartTransOrder;3 O c* Q- V# X
if @.Destination = void( K4 ^+ e8 i( X- E
then -- no transport order for vehicle @
d, n. ]* `7 p1 Z# l @.Destination :=
7 Z7 Q( \% Q; i rgManager.nearestFreeStation(@,track.~);
# P9 V% _7 H- n) x+ L newDirection(@); $ T$ l& {+ h, d# U" F
if @.Destination /= void then
, b% I) z- f. R; y8 Q: x @.Destination.NumReservation :=+ C4 @0 Y: v$ J9 }, p5 ]5 ]
@.Destination.NumReservation + 1;' y4 `9 K8 x# M2 Y j$ [: R8 ]# I
end;# _; ^) q: y8 [7 k! r0 J' `! D
@.CurrIcon := "drivingHome";
+ T' o, \/ t9 p9 B& E2 e @.DrivingHome := true;' ~3 w) Y! y1 A- B" j" s0 U1 ~/ k, p m# B
end;
+ O7 a0 e. d" U* q# @% j6 E3 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- m% S! @; w) K4 l! o. J2 I part := @.transpOrder;
; u* L5 }+ o1 d9 n6 |9 G part.move(@);-- load part
! p# G: A6 g) t8 G$ b @.CurrIcon := "load";$ ], E: Y( |, P: L l
GlobalDistObj := part.globDestination;, l: u. i, m6 [2 N0 N
assignLObj := rgmanager.rgAssignL;
6 _$ h# I1 r4 |- {0 P$ D, J; f' x row := assignLObj.getRowNo(GlobalDistObj);
' ~8 I5 g" {9 {* J7 j2 }1 A2 ?9 a if Row = -1 then -- since 70 Y% H" S4 j8 o9 V
if lan=1 then
: k; f4 w6 c1 L$ J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ }" w8 _% Y j% p to_str("in der Andockstation: \"",?.~.name,"\""));
# K4 f" t }; `! z4 j else& p2 `# V8 ?/ K5 z% r T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! l5 E2 ~/ e, C8 Y6 C) D5 k to_str("in docking station: \"",?.~.name,"\""));
+ ]. w% I$ N3 k# \3 o0 F, q end;7 a. I% r9 C1 g3 B
else" w: S0 S. V1 f+ O
@.Destination := assignLObj[1,row];' G2 ^: p) y5 M0 ]
end; 9 B4 B8 o6 |9 o V& J" p9 A+ {" t
newDirection(@);
4 f" w& v/ J0 G, m: V4 _; r7 w1 u @.HasOrder := true;
9 b, W" Z2 |- }8 X5 e end;
] g0 d0 E6 ^ end;$ ] z- k# d7 f( M
end; -- of the method
9 L( p( Y9 S, s6 k6 Q |