/* called by: entrance ctrl of the object 'track'9 }+ k( E: G, O$ H6 p0 \
*/5 x% ?0 e7 I9 `; M
is
! s% r, k+ Y! k& }7 j* p part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 `" f. H9 q% @6 A0 Q# r+ y0 Z4 c
do
$ X4 T3 `% @9 e5 v& d1 x5 o Lan := rootfolder.Internal.Tools.AOLlanguage;
6 |0 p0 L/ }5 \/ p. C if current = @.Destination -- else return
0 ^/ `+ L- D8 X8 k/ O+ E) Q then
, d- K7 \; o7 n- @; B2 }. @& { @.Destination := void;
F: d6 e2 t5 I' ~/ Q( s if @.occupied then9 e$ ^) r- H, z/ ^& S9 B
part := @.cont;7 O3 v; n" e7 d# z& S
@.transpOrder := void;. N/ L/ m9 f6 V! _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 O8 m3 ~4 H8 N4 ?/ h' U7 j
@,root.eventcontroller.simTime);$ Y8 M) [8 g% ~2 x( Z
@.HasOrder := false;
. {) |. H$ i! b3 Z. w @.DrivingHome := true;0 F4 `: l- U* s% h9 x! c
rgManager.tryToStartTransOrder;
: d% v+ A1 |4 ?/ z) A" l) i7 w if @.Destination = void
6 i. S, s- l$ M/ n! r7 R0 ? then -- no transport order for vehicle @' g! b: f, c9 Z8 t y+ L3 u
@.Destination :=
1 f/ C) Q" y \) z( Z9 w2 r rgManager.nearestFreeStation(@,track.~);
( [3 h2 A' {2 f newDirection(@); - C* u( a5 a7 K! r; A9 L
if @.Destination /= void then/ i/ O; C" t. ~/ W' d' z1 n
@.Destination.NumReservation :=' X ]( C- m# [+ V4 @
@.Destination.NumReservation + 1;
, d# L' m' }6 y/ ?$ N end;
* K% I# H& A% L1 S, _ @.CurrIcon := "drivingHome";
$ ?& s" ?$ G# r/ k @.DrivingHome := true;
; W' W. w/ _8 ~. \% X; v end;
* p* R/ o b& @: m else -- the vehicle @ is empty, both vehicle and part are in the same dock station( ?: h, ]$ R& j/ i: N! ^
part := @.transpOrder;- {( A) [* j0 H+ g
part.move(@);-- load part/ ?. B$ b, m/ N6 ^9 E
@.CurrIcon := "load";2 i$ U5 d9 u( o
GlobalDistObj := part.globDestination;7 p2 I" h+ W& v0 a" R" u1 c5 s( A$ N
assignLObj := rgmanager.rgAssignL;
/ ?: K" n. _1 { row := assignLObj.getRowNo(GlobalDistObj);, e7 [( @$ h4 E
if Row = -1 then -- since 70
4 g, u7 g! I/ H7 F$ t$ K5 l if lan=1 then* I1 y5 W% t! ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 `1 s7 s* ?( C; {1 D4 I% o; h
to_str("in der Andockstation: \"",?.~.name,"\""));. Z) m( ~/ q) w% p8 `0 l' J
else, S0 |3 e! `7 l- V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( o) I4 p5 Q" h; ?+ H7 m to_str("in docking station: \"",?.~.name,"\""));
) H" q) m e, _" d- z( F, c end;, W5 Q' q" v7 j5 V8 Z
else
6 k L2 h7 |4 m, g @.Destination := assignLObj[1,row];6 z" s$ @$ w3 `4 o9 V k/ E! o
end; - B6 \0 P7 z; h a
newDirection(@);
* q3 D1 o6 P: \2 g @.HasOrder := true;
1 t2 v# z0 _" h8 v. v/ [; F; ^/ c end;& Z% R8 g0 L- a) U: d" x
end;2 P8 |6 I7 N1 u
end; -- of the method
% _) Y q3 p1 T) T; e0 e |