/* called by: entrance ctrl of the object 'track'
|& \/ X/ p* h0 j+ W' ]" L*/2 W& ~6 @! e' q5 t! Y
is
& b* ?0 r4 n1 ^2 l5 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;' U( }, R# J* |: g2 H' A
do
% J& b; _8 r, r1 W9 F; }" \7 L' l0 J Lan := rootfolder.Internal.Tools.AOLlanguage;
+ i3 |- m3 D& i$ H( R if current = @.Destination -- else return
5 ~# ]% v! d. G" ? then9 h0 x9 }6 Q( g8 x/ y
@.Destination := void;
: n4 O. ~( u9 i3 k/ L0 o if @.occupied then2 \ \+ p3 z+ X/ s# V9 ~. p
part := @.cont;
7 F1 \# L: B9 O @.transpOrder := void;
- ^1 m' |8 U7 }$ w7 U, M$ u, k/ x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ c. N0 _; b4 b @,root.eventcontroller.simTime);5 \! ^& w+ [$ b' S
@.HasOrder := false;
5 R7 p+ I R9 ^! C @.DrivingHome := true;" @: a; ?. F' S. u3 j+ o
rgManager.tryToStartTransOrder;
' x( X8 E' Y4 \& ? if @.Destination = void
) d& Z0 s7 c" c" X4 D then -- no transport order for vehicle @
- x' c* P& Z) e5 a" J7 g5 ] @.Destination :=) \; z! T! j0 v2 X% K: w0 R
rgManager.nearestFreeStation(@,track.~);
; ^5 Y$ s" Y% I) q/ j' j) K newDirection(@); 9 l! s. S, `4 u& Y# X$ g2 v9 X
if @.Destination /= void then
- `* ]7 m. K4 | H/ e @.Destination.NumReservation :=, H5 y6 w4 U2 r1 T! \) {' h; R2 Y
@.Destination.NumReservation + 1;
, H. D' v% h1 T! U' b: S } end;
1 W- f. }6 M2 W4 q% R @.CurrIcon := "drivingHome";: c* \- h/ o. u6 x& l
@.DrivingHome := true;7 k2 J; q8 r% B! \2 Z9 p7 Z
end;
& ]; q8 V- o& F2 O5 U9 T! p! e1 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station* f: x8 s7 v2 N, K3 d
part := @.transpOrder;( U" O$ y2 i( X2 L, D3 d
part.move(@);-- load part
( N( c9 W [( z$ F: l) G @.CurrIcon := "load";0 X$ G& w; L A$ d) V* s% f
GlobalDistObj := part.globDestination;
1 F# b% ?) u% C/ ^ assignLObj := rgmanager.rgAssignL;
3 B$ k* d& P2 v row := assignLObj.getRowNo(GlobalDistObj);, @7 i9 V/ G# x7 Z" z, Z/ j
if Row = -1 then -- since 70
' I2 O2 g c( d, Q- c3 w if lan=1 then$ N, A; E( `: _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) X# S! b0 A6 ~" ]: e( ^2 [ to_str("in der Andockstation: \"",?.~.name,"\""));
$ m7 q* I% K; S else
' n- B- C, e% X" @: u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ H8 [" d) b1 ?5 m( i/ h
to_str("in docking station: \"",?.~.name,"\"")); ( b3 F, n; Y& g% M- z* u( k- ]* U @
end;6 u; J% z d( R8 e" m7 U# y
else
8 V# i( V& T* \ @.Destination := assignLObj[1,row];
4 U8 B5 o3 u& [- ~, z end; 8 Q- V7 R0 \& y! v$ ^2 f! B
newDirection(@);
4 N4 _5 S% w$ n8 R @.HasOrder := true;; c6 x4 {2 s0 ^: u6 k1 {/ w
end;
! v+ a( ~- n8 V* K8 I% a1 h7 _ end;
0 Q. ~4 a5 T9 m/ a7 U6 O/ V/ iend; -- of the method
6 R5 g9 m0 d5 C& u |