/* called by: entrance ctrl of the object 'track'8 ]1 A! V6 s# `7 G) s
*/4 m3 m& Q8 n/ l% {1 G
is e. W$ s2 Q; L+ p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ m( k" ^) H4 @4 }
do
5 g; W' Q! t* a Lan := rootfolder.Internal.Tools.AOLlanguage;
5 A; |: J- m2 w) V4 L+ s if current = @.Destination -- else return2 f+ U7 \7 {. E% J$ A0 t! u9 B" N5 M
then% L @0 s; L3 G" Y* c, n
@.Destination := void;
/ X; {: K+ B0 H# j$ f6 D ] if @.occupied then# r0 |0 B8 n. M- w
part := @.cont;
9 u: p) j4 P- e, _) O" m) a @.transpOrder := void;0 x$ k) |; y1 _! K1 `! q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," M4 x( ?, u$ W) A/ Z
@,root.eventcontroller.simTime);
& s* X! z0 @& ^+ V6 d @.HasOrder := false;0 F# R3 I% b! S5 y; T
@.DrivingHome := true;4 p: {6 P4 Q! w0 e. d8 K9 X, r
rgManager.tryToStartTransOrder;0 O2 m6 |& X3 e/ |; Q
if @.Destination = void
' [9 P9 I# d8 u1 e! t& S then -- no transport order for vehicle @1 g% e$ o( K# Q/ m7 V0 E4 E
@.Destination :=
3 w4 G8 V+ a0 | n rgManager.nearestFreeStation(@,track.~);
% A+ j9 q& r2 C+ h0 o- r! w+ G+ K newDirection(@);
7 O* Z) K6 t5 H( q6 v6 h if @.Destination /= void then
) g A7 l: a+ A: t2 h/ O) J3 T @.Destination.NumReservation :=4 y9 s3 p; u" @* A& U _
@.Destination.NumReservation + 1;* X; q, G8 t! y4 ~: z/ }$ p8 X
end;" I0 v% H! I6 z+ Q! n
@.CurrIcon := "drivingHome";
1 a" X! y6 Y0 U @.DrivingHome := true;
: M) z [. I# f' t3 t+ W end;
/ N: s4 m$ P& `4 T6 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station- F# M5 L5 I" q. C: w
part := @.transpOrder;
4 Z# ~; i/ @: v+ R* a. A part.move(@);-- load part4 ] s2 F# _3 Z% M6 `7 i
@.CurrIcon := "load";
' j4 J* ]; M5 L8 p; @; V! p% G! x GlobalDistObj := part.globDestination;
0 `- I7 B9 n% k3 b" |* z assignLObj := rgmanager.rgAssignL;) K& e9 { h+ {, O; Z& Y# h
row := assignLObj.getRowNo(GlobalDistObj);
0 q6 a/ h) N7 e$ |% t0 o2 x if Row = -1 then -- since 70/ H e; U0 i& @2 j( h3 S" \! ?# t% T
if lan=1 then# c/ f9 d$ ]5 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& L3 d7 a7 w( ^6 e7 x/ N' G7 v
to_str("in der Andockstation: \"",?.~.name,"\""));
' d, i: H# v8 v6 ~6 b else
6 ?' U7 n) D: V! a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; H8 t/ G. T7 V* p% A
to_str("in docking station: \"",?.~.name,"\"")); ( M9 g+ l: `. w" e+ ~
end;1 C3 y& Q1 d6 F" [2 d% j" m" F8 P
else
1 ^3 |# n6 _ N @.Destination := assignLObj[1,row];2 W' R# F/ y. s0 ]4 F4 @
end; : t- I8 `" R8 M. G3 H2 x9 o
newDirection(@);
" Y+ K' r3 d5 S, ]+ { @.HasOrder := true;
# a% P) z+ |' x) U, J* u& X9 [ end;
% @+ H9 b/ s% M1 c end;4 @2 N/ a3 B9 ?" D& X1 D. G
end; -- of the method
; Z3 Q& H& _0 J, `6 ]' q$ Y |