/* called by: entrance ctrl of the object 'track'
. r/ U+ i7 D9 [) \*/+ R0 B6 N( R5 ^' R, C* h6 K/ M
is
4 R( n0 F4 r, |% [0 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" n1 ?. G0 @% C6 { Z: Q2 A( Qdo- p' Q4 y& \; f! o; t
Lan := rootfolder.Internal.Tools.AOLlanguage;& m) ?6 b' a" Q1 c$ H& ], r
if current = @.Destination -- else return
0 j& _ q, V* u5 j0 h/ ? then
) v! v$ X4 Z4 y% }: [ @.Destination := void;
/ L# O( ?6 ^+ a1 t' }! l% Q if @.occupied then
& f& }( j8 ~- Z part := @.cont;# Q5 y6 A. Z+ Q4 k$ E$ s# i5 U
@.transpOrder := void;
# d8 o# @! @5 \& r6 M( B6 z/ o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, }& w+ |- F, W% g! g
@,root.eventcontroller.simTime);
1 T8 M" [' W0 V+ ~/ E @.HasOrder := false;
7 f- h& O, i& t+ K( n @.DrivingHome := true;" F$ F: m& n0 ]; O4 e4 a5 m4 M- ?& i
rgManager.tryToStartTransOrder;' j8 b, |. H$ { r# W9 V, Q
if @.Destination = void" R, V9 Z- W$ _; g, j, O( O
then -- no transport order for vehicle @2 \' o& }, k4 q/ F
@.Destination :=
& a. D7 y7 s6 f8 x rgManager.nearestFreeStation(@,track.~);
% _& a ?- Q6 K4 R newDirection(@);
/ e% ` I, c: Y/ ~1 s7 F if @.Destination /= void then
9 G( e1 ~2 y# ^ @.Destination.NumReservation :=: W1 h7 X1 p* A" P
@.Destination.NumReservation + 1;
% ]& P( ]5 G" D. F* g3 ~ end;
( C2 \# N) M3 N& J! W; f, N @.CurrIcon := "drivingHome";2 `2 q6 p; b! {: h. H7 N5 k# L
@.DrivingHome := true;: S1 L. o! ^# E# [% A; y
end;7 |4 [0 a$ \ V4 p) J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 A* Z( v* F4 w, M
part := @.transpOrder;' U+ _: _$ x) G7 M
part.move(@);-- load part
9 F% _$ K! b5 N; l/ g @.CurrIcon := "load";
* v" G: x: c+ O& C6 T0 P& c GlobalDistObj := part.globDestination;
: \- ]7 b( E& U( [4 P* v" g assignLObj := rgmanager.rgAssignL;& a" Z; P: q; J% T
row := assignLObj.getRowNo(GlobalDistObj);0 Y* w4 _: ?8 t2 A0 J- h
if Row = -1 then -- since 701 A/ c0 d$ d6 N, g9 j8 d- K
if lan=1 then( W) A$ U" H0 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 a* u9 i. T8 V- P to_str("in der Andockstation: \"",?.~.name,"\""));
# f; `. T3 d, K5 ^3 z+ E3 u. q/ s else5 r, p3 x v' w: [6 L' y. J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ b& e; I1 Z( i5 Y4 @ to_str("in docking station: \"",?.~.name,"\"")); N7 T* L3 M" H7 q% A" O I/ `
end;' x. B/ _" S& X' t5 l
else
1 H% p9 N3 l8 J3 n8 F @.Destination := assignLObj[1,row];& D6 O2 Q6 {% N: I t
end; , M p m3 y L/ z! y
newDirection(@);
) g+ B9 _7 c1 [% @, p7 @ @.HasOrder := true;
3 k" C! V8 U# m1 X% p2 I: d# m end;$ Y0 r3 K$ A, W5 t* x
end;
' ]. A. k* }3 \7 }; aend; -- of the method
, o5 ^; D5 [) ?# P, ]5 |+ g! q: B |