/* called by: entrance ctrl of the object 'track'2 a% S8 n; ^% i) m0 u9 P8 ?
*/
, Q7 U0 m. l2 f0 f& T2 Zis/ z* V( D v9 ?3 d. R( {, T/ p9 p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ V6 u! {) z0 g/ a! `7 W% _ @do
7 P! n7 D& W% W4 A Lan := rootfolder.Internal.Tools.AOLlanguage;1 i, b6 r! t O1 W& d5 M# d
if current = @.Destination -- else return- ]+ \4 M- J* `8 h) p
then
S6 z& s, s3 d2 T3 R; D @.Destination := void;$ H9 C. y* G! A9 R r
if @.occupied then
: K2 t/ w% o% b( b4 B# h- T part := @.cont;7 t: z5 j7 ^! \1 r" B% N
@.transpOrder := void;
6 b9 z6 o/ q) j4 c6 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- a" ^5 G, ?" S& Z7 {1 e- Y; u @,root.eventcontroller.simTime);
* ]9 Q+ {, g+ D2 `6 R# {& l @.HasOrder := false;
! L$ \% j+ Z% M( N1 m$ @ @.DrivingHome := true;0 a, i) u$ e3 K3 X( Y& a( p
rgManager.tryToStartTransOrder;
+ V0 Q1 E& i I) K1 R if @.Destination = void& K6 }+ b; B9 @: A
then -- no transport order for vehicle @
0 |& j1 y$ w2 u @.Destination :=# G& E. z6 A$ U5 B$ I" F
rgManager.nearestFreeStation(@,track.~);
^) ^) L8 P/ F% I' N( [ newDirection(@);
7 u" U l. J$ @& j7 [: M if @.Destination /= void then
# E, N% D0 r/ D @.Destination.NumReservation :=
) {" Y1 W& p5 g ]" g0 F @.Destination.NumReservation + 1;
# E1 h/ }; J, a end;/ m# W" q+ X! F$ s" r$ C5 o( x, x; Q9 o
@.CurrIcon := "drivingHome";7 V2 v& d2 y, C
@.DrivingHome := true;4 _4 A0 p( V; t2 N
end;0 U4 `& }+ f9 [8 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% z0 Z; i2 n- N4 ?. d* V* c
part := @.transpOrder;' E2 j2 x- y, e: x
part.move(@);-- load part
' K, c7 d+ D7 X( T) A @.CurrIcon := "load";8 Y' ^7 a9 z8 G! F6 t' @
GlobalDistObj := part.globDestination;
' U3 l( t# T% }' _. p7 w* W) ?. v assignLObj := rgmanager.rgAssignL;
6 K t$ x" m7 [2 L row := assignLObj.getRowNo(GlobalDistObj);1 k+ E# d3 r- b3 @* \( k: h
if Row = -1 then -- since 70
4 J' B4 l4 ^8 ?, S if lan=1 then' E9 O0 S* `) j/ h, M$ C& N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! g- f; e0 w% p. I to_str("in der Andockstation: \"",?.~.name,"\""));, S* W. C# t4 _7 z) ]
else5 r. A8 a# j: Y( m4 R: ?8 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% {/ j' u; ]2 I. w" I3 o( v# [" @
to_str("in docking station: \"",?.~.name,"\""));
& R8 \% }8 Q8 e4 q: X3 h/ u end;5 i% K5 x* ~3 v9 S& E' a
else2 P7 s1 v0 \! ~. U
@.Destination := assignLObj[1,row];7 k5 l2 {5 E5 ?8 p* ?6 b
end; / u9 f. V7 \( B. \1 N! E
newDirection(@);
6 f% I! N7 U4 \) ], ?" M+ ~ @.HasOrder := true;0 ?1 n9 ]! j: m
end;
: `8 F$ c# W( S8 H8 ^ end;
% f; U3 K& R8 ~end; -- of the method
/ m) u+ j5 _" g0 e$ e2 q |