/* called by: entrance ctrl of the object 'track'5 ~9 `# @+ z+ T1 d+ Y
*/$ B: u5 y2 f2 t5 ~, |
is
$ G5 Q. O# s+ e part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 {6 d+ z2 _/ N9 V; U) r/ A) ~
do& L1 s0 f6 Z% V. G# ], v
Lan := rootfolder.Internal.Tools.AOLlanguage;! P; i k' R) T% O% W
if current = @.Destination -- else return
' d/ W! x, ^" Z+ T/ n then
1 f. G: `# ]! N3 \" I, p! H @.Destination := void;7 x# ]; ^. w$ q X0 _$ ]
if @.occupied then
: R1 C5 a! O" |% y, V2 k part := @.cont;
7 ^. c5 N# [4 r3 y @.transpOrder := void;
. i$ a4 S: O' i# n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% y1 q6 }5 n1 K: O) `% y0 y0 A3 \* l
@,root.eventcontroller.simTime);6 h' O5 U U# \
@.HasOrder := false;
7 l5 i+ u5 C, A6 ^3 F @.DrivingHome := true;
1 F8 h' C/ d- Y+ T; o rgManager.tryToStartTransOrder;
4 N6 O# q8 n! t! Y& ?3 h+ z if @.Destination = void
: q. l* T9 n& x( u0 R% d then -- no transport order for vehicle @& s' k+ l% ?+ k: C1 ?& v5 s9 m& Q
@.Destination :=
/ z- I" j6 q0 _ rgManager.nearestFreeStation(@,track.~);
+ @: u" V4 o1 L9 c- S# M4 z& Y newDirection(@);
( V' Q9 n+ F3 `" d if @.Destination /= void then
! n2 d z, x& j! i* l @.Destination.NumReservation :=
+ I, d, c: Y1 A' }( T4 Z @.Destination.NumReservation + 1;
# p9 b5 u! G \4 d6 [: j' l end;
% ~6 W" |, a/ W" b+ d( W1 r @.CurrIcon := "drivingHome";
7 Q0 ]8 m$ ?- I @.DrivingHome := true;
) b8 ? Z+ \/ B% g end;) h& J* y) |9 o5 ^1 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 ?( y: Q" X7 S" z& ]* A
part := @.transpOrder;* X3 |' N# @$ C R7 w Z
part.move(@);-- load part
' m0 }& @8 Q6 B @.CurrIcon := "load";
& q# ^. B6 S5 G3 g1 }6 O2 q GlobalDistObj := part.globDestination;: n S% f, g2 T7 `5 z
assignLObj := rgmanager.rgAssignL;( V/ A* \2 m& F6 r! S. \
row := assignLObj.getRowNo(GlobalDistObj);
4 f( H/ a; }6 A. J3 p2 { if Row = -1 then -- since 70
" V9 S( m3 X- ] g8 ^ if lan=1 then
" k9 l+ e0 I% ]' x% w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 x& Y& T F: t, v j9 G to_str("in der Andockstation: \"",?.~.name,"\""));
( K/ ^4 S8 ~8 S9 \6 D, m else# X1 v/ B! ~9 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% D+ ^( M. @, t( I! @ to_str("in docking station: \"",?.~.name,"\""));
% f- W8 z* {( E' K. z1 |0 i end;8 g5 e0 F: B2 i) a7 r+ F9 r) }
else
5 ?; ^) m, G. h* c @.Destination := assignLObj[1,row];
9 Z" t& z, d8 P6 T3 \. f end; / Q& v( i0 Z$ T' q+ ]
newDirection(@);
3 l" N) y J7 R. o7 l: W/ @ @.HasOrder := true;
5 D1 C. |3 Q/ K5 y/ C end;% j& K' p: D: V/ A$ M; {
end;
& U: M' r4 h5 V1 |, ^- ]end; -- of the method6 ?( Q6 K; w1 V. L% G7 y' z
|