/* called by: entrance ctrl of the object 'track' C( `7 ~9 r c! Y) h a0 ?
*/ v! [: ?# T8 J1 g% C* M
is C3 U& f5 ~* [% m' Q; X5 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# l& C* x/ K I+ `, W2 E6 Q# ]8 K+ O
do4 K, r5 z1 e3 d+ }0 I
Lan := rootfolder.Internal.Tools.AOLlanguage;& b {6 O' v! Y' ~2 F. ?+ P: x
if current = @.Destination -- else return
2 G; n- @% l1 l3 d# O then
/ u1 [3 b) j, Y" s @.Destination := void;0 V& J& Q. N0 F; X9 ]/ ?( Z3 C/ }
if @.occupied then- O( v- ^$ \. e; G" _
part := @.cont;
: ?8 a+ b8 ^. A. d, a @.transpOrder := void;' }: [$ Q, P0 e% d: I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: [0 \# o3 g6 T2 n
@,root.eventcontroller.simTime);. ?( R% r3 L* C+ `" g
@.HasOrder := false;; q+ E3 m( V6 n! K) ~, I2 W( C) s& z
@.DrivingHome := true;8 \$ S4 e0 x8 ^4 x0 ^1 b# E2 Q2 m
rgManager.tryToStartTransOrder;) y- E- X' U. s( ^% u
if @.Destination = void
6 n6 n1 |6 G* K- c5 P then -- no transport order for vehicle @: a; u$ c( H2 R' K* U1 R
@.Destination :=$ O# V& k; T$ T( }$ N
rgManager.nearestFreeStation(@,track.~);8 C7 @* ^7 }7 W$ B) A! x' W
newDirection(@);
0 t8 X9 q7 |9 g& W5 {7 ?. ]" {$ b if @.Destination /= void then, [& H% r( a( z
@.Destination.NumReservation :=. w" g+ Y+ H' a ], [
@.Destination.NumReservation + 1;% C; s2 g" `. i( c ]6 X. X
end;# ^' G$ p% i' ^6 q
@.CurrIcon := "drivingHome";
' Z% ~# {+ Y; s$ d- g @.DrivingHome := true;( x* ?3 {+ C8 w% i1 ~! C
end;! y. s+ d/ `& [* F/ t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 x5 R! p2 C' I9 B: B8 [ part := @.transpOrder;
; h5 ~( f# N0 K" o" _% t part.move(@);-- load part
" l6 y6 b( A7 P% s @.CurrIcon := "load"; C8 {0 W; w1 x" L
GlobalDistObj := part.globDestination;
8 {- C5 a! g) m! K4 ^) Y8 J/ I assignLObj := rgmanager.rgAssignL;3 {; i: n" W! d% G
row := assignLObj.getRowNo(GlobalDistObj);1 v& _( E' ]) [! ]
if Row = -1 then -- since 70! c# \7 o7 }( f) C8 H% B/ `% }
if lan=1 then
: y) Y7 T& ?/ U3 v( V9 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; i5 V+ _* j8 M1 e8 T to_str("in der Andockstation: \"",?.~.name,"\""));) Q# e& K1 y) R: s- V. g X" {
else( \4 V$ E! P# |# w6 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 U; q9 A3 w5 g- z% |( ] to_str("in docking station: \"",?.~.name,"\"")); * `, R" D9 S/ Q: d- `
end;
6 s0 g$ V' O @0 Y T7 J+ B else
" I4 {. f* c4 }- _ @.Destination := assignLObj[1,row];' `$ C2 |4 _) V0 P6 J" o
end; # w3 B, y9 A8 W
newDirection(@);- l0 f, J" Q, Y
@.HasOrder := true;0 ~( n- L4 I9 E( }: [
end;
8 n. r. j: i+ p+ f end;* p7 J* }9 d0 }- z1 U. ^
end; -- of the method
* P: r+ V; N5 |% d( T5 `: R2 f |