/* called by: entrance ctrl of the object 'track'
8 |! O) p; w, h! \3 H*/
5 g1 x4 K. }* g& @0 vis
* T9 A8 T! r6 Y. K7 k' |& `$ o) B5 F) ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ e6 q% z, i' R) n& N
do
. ]2 c. G' t" ], P8 I Lan := rootfolder.Internal.Tools.AOLlanguage;0 o: g: k2 k6 U# p
if current = @.Destination -- else return
3 E/ S+ }7 k& E8 h5 X! Y; j6 A; D then
5 S# u. q/ _' | @.Destination := void;* z" G" F' o6 I) x' R6 V
if @.occupied then
8 U" v: Y4 x9 _2 Y1 v part := @.cont;
- n3 e9 d7 I' m% A( C @.transpOrder := void;5 X8 B& u$ N# s& {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. u7 \# X+ p, g/ D
@,root.eventcontroller.simTime);
5 y$ z0 Y" m/ ~% X$ n, s: V @.HasOrder := false;. }0 m: X( a& S
@.DrivingHome := true;! d4 p7 I( X b% V1 k1 h @
rgManager.tryToStartTransOrder;
2 L+ n3 L8 |3 H- y* | if @.Destination = void
5 k. Z/ i! |' O. k0 [# X! q0 k then -- no transport order for vehicle @4 \+ k& R3 o! d( r2 k0 B! d
@.Destination :=
, T% Z& w# N/ c) @% j4 I rgManager.nearestFreeStation(@,track.~);
* {4 `6 ?# \+ r5 w" G, t newDirection(@); 7 V4 @; f C& I: M! p6 l2 o- t
if @.Destination /= void then
/ q* h! E e. Q. `8 f6 _& o' V @.Destination.NumReservation :=
- F' q- @) ^' w/ ?2 n; O @.Destination.NumReservation + 1;
) n( c2 b+ b3 S6 z" p; L% P end;
0 E X) z) N. m8 u' b' L k5 F @.CurrIcon := "drivingHome";9 _7 g5 Z0 s$ r& `$ W: v
@.DrivingHome := true;. y6 x6 M/ Z7 K) b; B) U- r+ Y+ T3 x
end;8 n6 g8 W( m4 t9 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ d7 c* B& Q* A- R6 l
part := @.transpOrder;* e% \( q3 r1 s b) E6 g% b
part.move(@);-- load part. O3 Z+ M& q( t2 _* \
@.CurrIcon := "load";
5 n$ K! _: E8 C7 q8 } GlobalDistObj := part.globDestination;
) ]! |8 ^% e0 U- g0 d% r4 P assignLObj := rgmanager.rgAssignL;9 C* _% L; N8 E6 H v
row := assignLObj.getRowNo(GlobalDistObj);% k; d) V! d9 m9 a- R0 [/ \, `
if Row = -1 then -- since 70* c% j5 ^' a; ?
if lan=1 then
' w) g0 {% x, P* p9 b0 D2 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 P( x7 H% K0 P
to_str("in der Andockstation: \"",?.~.name,"\""));: A* W5 Y7 P0 L" ^
else
) \! i, w! w. h, B; U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ \5 a' O- z/ ^. s
to_str("in docking station: \"",?.~.name,"\"")); 1 ^5 |4 d4 \5 Z* l
end;
" _0 p, x+ q8 j else
2 D0 P0 A3 Y/ o# ~/ Q2 E' y' J @.Destination := assignLObj[1,row];
5 ~' k/ o. T" j7 G( q( O% F end; - K' j/ F( [1 v( @
newDirection(@);
# N- _) M u+ ]% R @.HasOrder := true;
0 W- x2 x- R$ E" i* F3 Q end;
4 g* F0 i \( v, r. {8 h9 u- ^ end;+ o t- {7 q/ E9 Y, P
end; -- of the method
7 T) t3 H( T& g' |9 F |