/* called by: entrance ctrl of the object 'track'
: C& h* V3 {) ?' v*/
+ [5 u. g3 h. b8 d+ g( A3 }is
( D! _: D/ {1 Q# A9 G* H. [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 p3 {5 h) j& N+ gdo _2 p/ D2 `! t W# [- w* ~ q
Lan := rootfolder.Internal.Tools.AOLlanguage;
* \# L: Z9 m2 z2 a5 \5 Z& M if current = @.Destination -- else return
) s. R, O: s/ D0 I+ {2 \! P7 Q- s) A1 D# e then
) o9 q4 E2 w4 B/ M @.Destination := void;
& T" C, [' Z( }2 c8 U if @.occupied then
( D/ P" s0 d2 [* i6 D( |4 p: v; \ part := @.cont;
, \# C0 z1 f( m& Q0 N+ A5 o @.transpOrder := void; \3 g1 F/ }9 Z: y$ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," F+ M# F- U3 V
@,root.eventcontroller.simTime);
/ |5 U- Y! z8 ^2 ?3 O* W; r7 E @.HasOrder := false;
. b& X, e I. {! L. |5 e3 L @.DrivingHome := true;7 q' [+ p' C8 G: l. c
rgManager.tryToStartTransOrder; G) v- P% i* Z, d) t2 D, [- E
if @.Destination = void
j7 a$ h/ g/ K; N0 d, E then -- no transport order for vehicle @
! X& `: N. x, J) u @.Destination :=
# G2 O9 H) @) R# F' a rgManager.nearestFreeStation(@,track.~);
1 ?5 z% |6 W, f+ x% A& h newDirection(@);
% s& x6 b7 H" D1 ^ if @.Destination /= void then% i4 N2 Y% s: Q. ]3 W" M
@.Destination.NumReservation :=, \9 y/ D: J) x4 A0 \! W
@.Destination.NumReservation + 1;6 w" w# O; N; h$ W0 s1 `0 ?, o
end;
- N1 E/ }$ C: F9 |; `* |: } @.CurrIcon := "drivingHome";0 u6 q$ \3 t/ I
@.DrivingHome := true;
. s: M9 d1 `1 e7 k0 O8 C end;) y; V" h9 G% H7 w* V: Q# A6 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ^! K$ U5 @9 v9 w* t part := @.transpOrder;' L0 m, I4 `: ^7 h9 ~& N
part.move(@);-- load part W$ J3 Z0 Y* [$ e
@.CurrIcon := "load";5 W+ z2 W$ Z, S+ @
GlobalDistObj := part.globDestination;' y8 D* u! U* J# @; X4 b8 }
assignLObj := rgmanager.rgAssignL;
6 L) o/ M* T. ]) @4 E# K8 b+ @ row := assignLObj.getRowNo(GlobalDistObj);
6 g: _" a% ]% ~ C$ D3 l# v if Row = -1 then -- since 70( ^/ ?0 O/ U0 U6 I- g# N3 _# J- `
if lan=1 then* V2 [, V9 G v- z/ X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- Z! ?- O! Z: X: `# m: Z3 } to_str("in der Andockstation: \"",?.~.name,"\""));
, }4 ~' f( X* t* H else
6 @ Y% o: [& w0 `+ T4 S0 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 P6 \8 f; s8 e( f& p' n7 M8 K8 N/ B4 o/ b
to_str("in docking station: \"",?.~.name,"\""));
. p, Q0 B$ _1 M Z* g end;
- E" P2 ~' z" @+ ~ else
( `0 E. h1 ]8 G/ T& M' d$ q' V. d! \6 k @.Destination := assignLObj[1,row];
/ j" ?2 x( i6 B' t8 @ end;
7 {8 Y1 s& s t7 z newDirection(@);
/ `+ I( C1 K. C @.HasOrder := true;
5 X E# e$ J" o9 ]/ H W! ^( p# A: q end;( k0 K! i; U x6 W1 O
end;
0 B7 q6 @8 r. e( hend; -- of the method
3 b# ~/ @* \3 I, w |