/* called by: entrance ctrl of the object 'track'9 g0 E( L5 P& e3 u( R, l2 A( X5 n
*/
+ q* R2 k5 G& j( \ gis6 S( R# |- m6 E* s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: F1 T, H9 c- w! X
do/ R* I3 J% h9 q( N) ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 y- Q. G7 j5 l# O7 J5 r if current = @.Destination -- else return
w% S8 N) U& a$ r0 h ~) X) X3 x then
4 T$ W( l; c9 a @.Destination := void;6 f0 p" I4 p5 x& }" p( ]6 M
if @.occupied then
9 e; _/ S5 p7 w5 J5 V7 E) z part := @.cont;
n- u! U$ \! S* X) l8 | @.transpOrder := void;9 V4 { l8 z1 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 D3 ?% P! {0 R5 p) w9 O
@,root.eventcontroller.simTime); e2 e1 u1 P/ s2 }, w9 V, d% ^
@.HasOrder := false;7 O8 }5 `0 U d$ b
@.DrivingHome := true;
3 n9 n8 b. {$ x! s4 O# Y rgManager.tryToStartTransOrder;
( a0 M) l' a d6 X7 m$ b/ W) ]% { if @.Destination = void5 G, y' Y$ r! L0 U0 V
then -- no transport order for vehicle @
8 H' n* f( b$ g @.Destination :=3 g$ a. y* X- `: a/ [% m1 B
rgManager.nearestFreeStation(@,track.~);
f. E! [: r8 w9 y4 H newDirection(@); % M! \2 e! ~% j* U! o9 e6 W& n# C
if @.Destination /= void then
0 o, D9 \" s, t @.Destination.NumReservation :=
; B h; G m9 ^+ U% t% O5 A( S @.Destination.NumReservation + 1;/ H$ O; V# Y& J7 n
end;
( Z! V2 E* u* G# q& G2 s8 z @.CurrIcon := "drivingHome";; d! _. T2 o4 D# @/ g* K$ `7 t8 x
@.DrivingHome := true;, X" N; \5 F' |% h
end;& }! W% T" B: r9 j% w! o3 d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station r. r' H1 T& v/ N. K. G1 \; {, R
part := @.transpOrder; u$ Y$ T+ @* Y/ W: e) r
part.move(@);-- load part
. b5 K+ R3 b+ n/ {% k1 y @.CurrIcon := "load";
0 Z' ~6 Q" E4 `. _# {! O* e0 Q p GlobalDistObj := part.globDestination;& q% U7 w) n0 o) \* J
assignLObj := rgmanager.rgAssignL;$ f7 d6 h& M( Q% {( [
row := assignLObj.getRowNo(GlobalDistObj);
7 z; s& `! G! e if Row = -1 then -- since 70. l2 d" P0 P1 z- E
if lan=1 then
5 ^! E5 `& D& Q# e: ^9 V" P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) H% P/ t8 t, H" p7 n to_str("in der Andockstation: \"",?.~.name,"\""));+ q& ]2 K7 h: ?
else
- ~5 ^- o2 t2 _ ]9 o) |9 Y8 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ~" P# e& R8 J8 r* E
to_str("in docking station: \"",?.~.name,"\"")); . }% u: O/ x+ d- p2 z ^7 d* z1 H
end;
% ?7 c6 h, l. v$ q9 B6 k4 V1 { else2 }/ x4 s+ I% r7 X0 E% W: x
@.Destination := assignLObj[1,row];
7 L0 `( ^5 n3 [- c end;
3 j5 d" D0 s, @6 X newDirection(@);3 p' E5 A/ R3 }) G k6 b
@.HasOrder := true;
, @( Y$ M6 t) y4 \9 _ end;
: l) y5 \, |1 Y5 H end;
2 q4 p" ]$ p+ Zend; -- of the method
) X- l3 m; D) i |