/* called by: entrance ctrl of the object 'track'1 Q0 e, R7 H$ E% m0 M" }8 k! ]% ]0 E9 E
*/+ ^( Q4 g6 k R% u
is7 I Q" `- Y1 \- U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ?7 W9 A+ u9 K9 R, \; A9 Q9 W
do
9 c: i/ |: {: @0 t+ v6 E& C! u Lan := rootfolder.Internal.Tools.AOLlanguage;- a5 G7 z3 L( f) K ?' [
if current = @.Destination -- else return, e! `+ b1 l! J4 h( C
then" R6 X& H3 a$ m! _6 n l8 x; @9 J
@.Destination := void;
. M: f/ o3 L5 P. s" @ if @.occupied then
+ k" I9 {' Y# M# Y part := @.cont;: v/ L/ f" W( a% C0 e1 q
@.transpOrder := void;
( q i* V. R: S8 \& k( h& X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 k: ?$ a& w4 e. H @,root.eventcontroller.simTime);
4 M l% t/ @+ { @.HasOrder := false;" \% k# s( V8 J2 a
@.DrivingHome := true;* B8 U9 R- L0 a1 F) f% w* k) G- Q
rgManager.tryToStartTransOrder;
4 W* Z8 ]/ I: \; o6 a; i if @.Destination = void
( w& {0 G. ~: m4 ` then -- no transport order for vehicle @8 }" P U! ^& g( p o4 V- C
@.Destination :=
^. y, a7 L3 `! ^' X rgManager.nearestFreeStation(@,track.~);2 b, r1 w$ Q2 B( J( E! E
newDirection(@); # f. o, F1 p* X n2 ^+ v
if @.Destination /= void then' c( I: G7 D5 E0 f) R
@.Destination.NumReservation :=
" o/ O- U. K& e3 r" W0 B) s @.Destination.NumReservation + 1;
& M4 {- K9 e& U$ X, ^9 n# M! ]2 I1 t end;* S% J5 E x( W' E
@.CurrIcon := "drivingHome";/ W- A' i) s8 a
@.DrivingHome := true;- }+ t7 A8 ^2 ]9 b. F3 S5 \# L, Y
end;
2 r6 U) |) a# H* \1 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ b' D) j& s8 y& X
part := @.transpOrder;
+ S( v l. c% [. L1 r0 j3 ~& ~ part.move(@);-- load part5 J K5 k& x' K3 V. }; z! J
@.CurrIcon := "load";5 K, w; t# P1 S8 W
GlobalDistObj := part.globDestination;
' o: F- e: z8 [* l+ j, ~ i assignLObj := rgmanager.rgAssignL;
: G5 X" ^0 G e5 R row := assignLObj.getRowNo(GlobalDistObj);
6 ?4 X+ p# E: f& \% a3 i if Row = -1 then -- since 709 x0 H4 b$ v- s' ~
if lan=1 then
, c! T4 Q+ c" C# N+ A, ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: d7 ]4 ^ E D9 [! e. j9 l
to_str("in der Andockstation: \"",?.~.name,"\""));' K- O, \) b% t; T; H7 y* r6 [$ H* \' C
else) l+ P: ?, c% I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 [2 H0 `0 c% Q; Q9 w
to_str("in docking station: \"",?.~.name,"\""));
2 r9 C) x: F( m% j& t end;5 `- n3 R8 [: n1 ~) \& P/ w6 z1 j/ Z
else: Y& F% c% @2 l; A4 Y8 m( {" r9 z
@.Destination := assignLObj[1,row];
5 M7 p$ s0 ^& J4 ?( y1 W4 z end;
# S( k6 N) Y _9 s- T newDirection(@);
3 Y7 q6 I* r" W% L @.HasOrder := true;$ p: d0 ?- |5 V: x( n0 B
end;. r) O! ^& } e; i
end;! x) N# F8 I2 S8 q/ w
end; -- of the method, V) d1 Q8 r+ ] D6 l- I
|