/* called by: entrance ctrl of the object 'track'
X" b5 w8 Z7 C# r" f, G, I4 t*/
" f0 t1 h# i$ \is% P# C1 z0 S( N1 T9 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 f2 Z5 F! x* C# g- B' c" F
do6 ]9 q0 R; R, M. P/ v5 z7 g
Lan := rootfolder.Internal.Tools.AOLlanguage;
B% [- G0 B! n$ x if current = @.Destination -- else return, G, d" W* `+ q
then, _5 z: s9 d$ e E4 t
@.Destination := void;9 n' A; V, d: X4 h) @* G
if @.occupied then; b. i# w* y. Y' Q% o" q, `. Y
part := @.cont;+ S0 o( R( |: @4 E4 K9 A; r% R
@.transpOrder := void;- j5 }: j0 e$ V! j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( N0 w9 f+ m3 x- w$ A6 W) z9 y0 a
@,root.eventcontroller.simTime);
' e$ {4 Z5 ]0 d! W2 d @.HasOrder := false;
3 h$ R6 E. f' e. c0 ]1 F& L" Z @.DrivingHome := true;
( _8 c6 {' P9 L/ J rgManager.tryToStartTransOrder;9 Z" F) j2 @' d3 o. C9 }/ o
if @.Destination = void9 ^6 \1 k* ?1 m; F" j) G
then -- no transport order for vehicle @2 ^: `& b) g3 A$ F: A) s+ H
@.Destination :=. o# K/ [ e7 @/ \( s" M6 U
rgManager.nearestFreeStation(@,track.~);. {/ v% m& J% a! W: g* k- N
newDirection(@);
" O% |9 s" w' v* K9 k& }! f: `: a if @.Destination /= void then3 x1 F) P0 \4 _& v% P1 Y
@.Destination.NumReservation :=
; e e; A, J8 @2 k; }( J( m# w. p @.Destination.NumReservation + 1;* _" u& W2 Z7 f i& s; _" R+ t
end;
2 }; O4 l4 j/ W) e3 e+ Q @.CurrIcon := "drivingHome";+ v# |$ U- I% {: S
@.DrivingHome := true;. q# c7 N1 c$ u; S0 \" \5 i8 }
end;! L; V% q6 n5 a. p" V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 [6 s. M; {9 s
part := @.transpOrder; L7 {* c5 \. y- T9 a, a+ }
part.move(@);-- load part3 E+ M" Z% j' q3 @, A
@.CurrIcon := "load";
; g9 W7 [: `* O( T9 ~6 I2 m GlobalDistObj := part.globDestination;
/ S, r P7 I5 ?- m" {) t assignLObj := rgmanager.rgAssignL;- W7 @0 k0 [+ P2 W
row := assignLObj.getRowNo(GlobalDistObj);
" j2 v' x. G8 c if Row = -1 then -- since 70
- }: s! \. m$ ^; m7 q! k if lan=1 then
! T1 A9 a% e. ~2 m; z# b2 D" B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& a7 d) R3 i: L7 u; P! C( x4 [ to_str("in der Andockstation: \"",?.~.name,"\""));- _! E+ r E! Q5 ?, J1 M
else5 ]' ]1 C1 h1 X3 z, b5 m$ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ^- i/ M# r+ n+ @( ^& o- b to_str("in docking station: \"",?.~.name,"\"")); # G7 l# s( W7 Q6 ^+ E& s* w: a7 ~
end;
7 P( z2 C( q1 z- c7 K G( P {0 F else F$ `* N/ J, v% |4 z4 u2 A6 R
@.Destination := assignLObj[1,row];
- F$ s) F" K. e0 X1 C- O% g5 @ end; ' i4 F$ h( B4 d$ K* d c) q% ~- C
newDirection(@);
- r( F& T8 x, ~ { @.HasOrder := true;
2 K2 }7 M6 c( y# @ end;
# k2 ]. e) F- S, M end;# F7 Q+ Q- {/ J" M( G' @, q
end; -- of the method
k$ H, X" }% c; B+ P& C |