/* called by: entrance ctrl of the object 'track'! @6 Z- O0 e/ c9 {6 e
*/
+ y$ ?) ?- i7 J* f7 N& ?5 }# Uis
+ }+ ~6 e: b- f W5 g8 S part, GlobalDistObj, assignLObj:object;row,Lan:integer;( R: R3 u. P/ b" x& B& Y
do4 Q J$ P6 E! V
Lan := rootfolder.Internal.Tools.AOLlanguage;; l0 |* L* k* i( T( }# y: p8 b
if current = @.Destination -- else return
; W5 f9 G" Q* i0 ?/ f$ G; d6 }9 @ then$ p5 x- {* }% o& N1 f# U8 ]
@.Destination := void;
( ^; r( B( F8 v, j if @.occupied then6 _6 h0 J: W; Z4 J: d
part := @.cont;) j( ?' |* K* N3 D% u1 u0 R& J
@.transpOrder := void;0 _6 m6 k0 U, p: T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 d n* R2 N1 K, q$ [% H+ [6 c$ `
@,root.eventcontroller.simTime);
9 a2 a1 [) v4 E) f/ B$ O @.HasOrder := false;
8 i' y: @3 M, X @.DrivingHome := true;8 s* O, F: {# h3 c& J5 G- |
rgManager.tryToStartTransOrder;) R: ^* ~# c1 I0 t' \
if @.Destination = void
F0 r* d, n& k' e9 g then -- no transport order for vehicle @
3 Q3 ~$ _5 m8 a/ w6 a2 P2 n @.Destination :=+ Y a9 l& F; M* j$ ~# B- ^7 x
rgManager.nearestFreeStation(@,track.~);
- Y3 G- X! R& j4 k2 X" x4 f newDirection(@);
# T. B( t' k k/ q, `2 w5 g6 y% \0 z0 X if @.Destination /= void then
9 n1 {7 p5 E" I2 y! B5 Q @.Destination.NumReservation :=
- f; {1 {/ | M+ y, R4 ? @.Destination.NumReservation + 1;- N4 L# @4 u( p8 e s
end;+ ~/ u6 A- ]9 J6 k* U
@.CurrIcon := "drivingHome";7 [: }/ p4 h! E `5 i( O: ~
@.DrivingHome := true;! X n8 p) E- m9 J. g$ Q
end;! U5 u8 Z6 C- X2 T% M7 x. w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 D% T9 }4 P' [# y
part := @.transpOrder;& g+ D3 K) D+ M* q
part.move(@);-- load part
' L3 J) L3 x6 S# H( j+ r2 V @.CurrIcon := "load";6 g+ V: x9 J3 g: D4 s) Q
GlobalDistObj := part.globDestination;: e# o5 z/ U" M: d% ], j4 ?
assignLObj := rgmanager.rgAssignL;7 z: }/ _& I/ ^) Z/ l. L( d. }
row := assignLObj.getRowNo(GlobalDistObj);+ F$ S# P, F. X4 G8 j) G
if Row = -1 then -- since 70
6 H2 E5 O! i2 u. v8 Z& m if lan=1 then
3 C3 I G8 @% L+ t R* X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ?, j$ j# [' [: } to_str("in der Andockstation: \"",?.~.name,"\""));
, j, X1 @* M) P4 B& \# G else& p5 X* y* \7 k" X" y. X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ G4 g! _3 [: W; e- o* u
to_str("in docking station: \"",?.~.name,"\"")); {, g* h+ }2 r) M) z- D
end;: L! ]' b1 u8 e" t
else
2 S1 c6 ?& T2 T8 f @.Destination := assignLObj[1,row];$ v) D+ S2 c5 z- W
end;
! X0 _' U& ?# q newDirection(@);9 a$ t7 _. @9 f& m1 \% ^' }
@.HasOrder := true;
0 G8 T3 ]0 \% I$ b& e$ e end;
; N9 K. a) s7 K7 J3 W end;. z" ^ p" A$ Y' W6 v: Z8 I6 g' a
end; -- of the method
' `3 w. J: a( a0 Y0 n0 o4 D |