/* called by: entrance ctrl of the object 'track'
1 F# [1 i9 |/ M# f5 r*/
i+ P6 H5 ^8 Vis- o* |7 P) Q3 z! ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
[2 t2 _" h2 Kdo, l4 ~- J4 T0 }8 V
Lan := rootfolder.Internal.Tools.AOLlanguage;2 `, p; l8 u/ [0 P. i8 |6 n x
if current = @.Destination -- else return0 r, z- X5 t, ~) s# _: i
then# Q$ h& y7 H$ b1 T/ f- S; s
@.Destination := void;
7 R3 f( Y1 g( ^; c& o" U) s if @.occupied then
7 t& ~& Q6 W2 a! a$ m part := @.cont;
2 M/ A/ N+ k- h5 @: e# Q @.transpOrder := void;8 x) Z4 I. U1 g, y( B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 k4 {5 F0 E( a% k6 _; e& s5 R0 C
@,root.eventcontroller.simTime);8 q: c% |5 S7 @1 ^* k8 a B& Z h
@.HasOrder := false;
/ e) }# T0 U, Q& Z# C" V @.DrivingHome := true;) s1 U! ~+ {9 C9 |. p7 r+ [1 Y
rgManager.tryToStartTransOrder;$ }- f; ]* J+ o% W
if @.Destination = void8 j* N* Q, I# ]/ w
then -- no transport order for vehicle @6 m& o& X; K1 T: G6 m) z" ^9 w" g$ f
@.Destination :=
2 f* p$ t, o6 p. o5 t$ h rgManager.nearestFreeStation(@,track.~);8 s, C) Z. n/ A
newDirection(@);
+ g% `! M5 D# v9 ~+ j& ^; C1 ?9 G if @.Destination /= void then g$ S8 O* Y2 a/ [' c0 g
@.Destination.NumReservation :=6 I# m. h) S& j7 Q! m3 k+ R7 f
@.Destination.NumReservation + 1;
* P: t1 ?) D2 i, v9 _4 ^' j; y5 d u' p end;2 f T7 X- o9 t8 t# Q
@.CurrIcon := "drivingHome";' f9 ?, }2 U- Y8 Q
@.DrivingHome := true;
- m) x6 D$ Y( Q$ Z end;, x& s3 ~, M. _! i! v. [6 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) M; ?5 K0 g& W7 ~, K9 {9 T& y6 _ part := @.transpOrder;
' e& O8 D5 u# ` part.move(@);-- load part
$ j% ]4 U' S4 j$ o0 z @.CurrIcon := "load";
$ q( M, u0 L; }) w& X GlobalDistObj := part.globDestination; H; B* J) z% T& _4 s! n" Y. v
assignLObj := rgmanager.rgAssignL;- G/ ?$ \& h4 ]% R% Q7 {: ]
row := assignLObj.getRowNo(GlobalDistObj);9 a5 U9 @- T+ @
if Row = -1 then -- since 702 I1 I a. ]! K2 e* J
if lan=1 then! y/ I: ^# \, _0 u Z: R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 C% j d0 j/ O2 l$ X7 E0 n( I to_str("in der Andockstation: \"",?.~.name,"\""));
: |$ s2 z: H5 m9 h else
9 ?! Q: N& z2 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, k5 I1 Y5 T: c* { to_str("in docking station: \"",?.~.name,"\""));
5 l9 p) h4 e9 _ end;
. s3 X% `. c+ ]6 c else# w- @% U: I) o$ |: `9 U
@.Destination := assignLObj[1,row];
Z: _+ f% C6 e; Q9 f; x end;
& f# ` l+ Q4 i9 a0 M2 n newDirection(@);
. X; O7 j, {# a1 k' n6 u- ?9 ] @.HasOrder := true;
V! b g4 h% ?* r0 t4 q( `. S end;
0 t; c& b) e& n5 c8 t/ h/ _ end;- {8 K. B# ~/ u# P1 |9 A
end; -- of the method
3 O5 w1 p, O( i4 Q; u0 r* _% p |