/* called by: entrance ctrl of the object 'track'
/ \( w1 S! r ^; C1 i! W*/" p4 o" m1 n2 g
is9 ]( X$ U4 l, B7 f% B: w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& |2 d e1 I9 w# b g
do
/ t0 E+ m6 V' W Lan := rootfolder.Internal.Tools.AOLlanguage;
; u+ Y8 P2 n7 s+ j if current = @.Destination -- else return- a) k' V" D1 ~4 T
then# T: i9 h X1 M
@.Destination := void;/ t7 N, V) I6 ~1 V
if @.occupied then/ I) v/ N6 ~# l5 u3 r; P9 J
part := @.cont;4 o. Y: y9 ?9 o8 }4 b/ v- F
@.transpOrder := void;
7 F, u) ~* X3 |2 e% v# F$ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; X* d5 @; F# ?) |- K( k9 |7 @
@,root.eventcontroller.simTime);: P, g4 t3 h0 Q4 u9 m7 u
@.HasOrder := false;: r0 g: @6 _- I9 o9 @5 s
@.DrivingHome := true; _0 i4 |, W3 T2 ^+ c
rgManager.tryToStartTransOrder;" i! x' ?1 T2 m) \ N; \
if @.Destination = void" z1 j; _6 r* E- T2 N) t6 T3 W/ f
then -- no transport order for vehicle @- H5 n7 V1 e8 _+ k9 V
@.Destination :=
, a- k% h. D! e+ X rgManager.nearestFreeStation(@,track.~);1 u, E' i2 g1 L. n$ S% b
newDirection(@);
4 ^' a* ~7 p, H/ p; O2 Y+ F5 _ if @.Destination /= void then
% I n$ N/ I# t( k. U @.Destination.NumReservation :=. t# Q! w( @6 k4 s' Q+ r0 @
@.Destination.NumReservation + 1;
. I ]/ M% x: _ end;
' e' h- g3 F7 m+ K# G5 g8 _+ P; x @.CurrIcon := "drivingHome";2 ]+ v# X3 g+ S6 `
@.DrivingHome := true;! ]0 e; K# b3 K. P+ M# w! v
end;4 w: P; W) `+ z" J- a) P/ y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Z1 c) |8 Y" x# n# B0 G
part := @.transpOrder;
) J$ @/ Q( r" [: d+ X part.move(@);-- load part0 i& e% c5 I$ O3 n
@.CurrIcon := "load";
c& {) Q& i- z GlobalDistObj := part.globDestination;
; V+ F" X' J# u; @ assignLObj := rgmanager.rgAssignL;
2 o8 I4 X2 o7 M8 J row := assignLObj.getRowNo(GlobalDistObj); n( w% Q- W! h1 [' ^
if Row = -1 then -- since 70% |5 ?, H4 A7 w5 _9 v) m
if lan=1 then
' b$ B) K1 w/ x/ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& @7 S2 t; C8 e; y to_str("in der Andockstation: \"",?.~.name,"\""));
+ T6 S* _, U. Z& X7 y8 X else- S8 Y" X) E& E* u% d' u% m' @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; O$ ]9 O/ I5 s# z to_str("in docking station: \"",?.~.name,"\""));
4 U5 o6 \% C9 ~* v; J, ~ end;
8 e4 J' I+ g+ d# W& A else
" N5 T- s+ H3 ?: j0 O5 E @.Destination := assignLObj[1,row];
$ h0 O! L, z. U4 z0 O6 B0 Z! O% O end; + b. H! u8 w3 R8 D0 b
newDirection(@);
# I: r) w4 I! g! T7 D! U O @.HasOrder := true; r' n4 T- I& } ~( |: U# B. Q
end;
/ N3 D D5 ?9 F& a( i$ A end;
9 R: W2 Q- _/ L# g6 W/ b H* Aend; -- of the method, t+ V) {( k+ E4 ] w) ]
|