/* called by: entrance ctrl of the object 'track'
7 q+ G$ f3 f9 O: H8 u8 p5 y- k*/( g. @2 z, R% Q% _ i
is; R0 s& Z' I+ Q/ C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [1 [ x0 E. Sdo3 j9 C) c3 I, o; s
Lan := rootfolder.Internal.Tools.AOLlanguage;% n7 U3 o3 @& C
if current = @.Destination -- else return
$ A1 q& f3 z: |1 B' { then
2 o$ M6 A0 w2 W b# v. { @.Destination := void;
. D: v% F$ P4 I* e) |0 N5 s4 r if @.occupied then1 j g" l! C( g( s1 _+ U
part := @.cont;
: q% u4 W) Y+ `! r1 @1 f; m0 X) @ @.transpOrder := void;' h+ z" g( X5 k$ D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 K2 d G& y0 {- Z' i @,root.eventcontroller.simTime);8 ~, w; e6 A% \$ {
@.HasOrder := false;2 F; [" W. x& s3 d
@.DrivingHome := true;
( A- F6 u# z, a+ ` rgManager.tryToStartTransOrder;
/ @" [6 k( b4 I4 f% @* T" u" t* A if @.Destination = void& B6 _( O) e: V( z; y! E A
then -- no transport order for vehicle @! X& j5 l5 {' l
@.Destination :=$ V; R7 e! c7 {
rgManager.nearestFreeStation(@,track.~);1 w% P. p+ D. D# p9 O6 u) F
newDirection(@); ! Q) ~* d# Q( a5 t. t" V
if @.Destination /= void then
- X. c J% }( |! u: y, x2 m7 _1 u$ v @.Destination.NumReservation :=
3 M8 K- ?$ _- _3 ?' A, S; } @.Destination.NumReservation + 1;
/ o! z, ~+ e/ ~: j end;3 V2 I; O! S* O* t( E+ n
@.CurrIcon := "drivingHome"; X3 ^* l, h; H( f1 V; C+ }
@.DrivingHome := true;
! E r, Z- [6 I( b# C end; q5 J% T1 G: O! H0 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& f n, t. V4 W part := @.transpOrder;
, U. `# z$ H0 K part.move(@);-- load part
o$ j5 Z: _8 G- [% t @.CurrIcon := "load";- ~; E6 \& a- [$ \' U
GlobalDistObj := part.globDestination;' O: D7 Q* P. q- A& s1 G3 q, a
assignLObj := rgmanager.rgAssignL;
1 O/ u' l/ Z: R- i4 P row := assignLObj.getRowNo(GlobalDistObj);6 e5 c; s+ Y; D' `
if Row = -1 then -- since 70
# o: N$ `! \$ D' @- h9 N if lan=1 then$ K" L6 d8 E7 [* j$ C# H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 o: |3 \5 G/ p- y1 [ o0 S. r
to_str("in der Andockstation: \"",?.~.name,"\""));0 t U( w3 |9 z Y: N4 O) N: e, H2 r
else, k- p& o$ Y8 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 x7 l. D! m- q$ a: k to_str("in docking station: \"",?.~.name,"\"")); ; }$ a2 A7 x. P1 F4 x: n
end;
" w0 m* q; C& Y else$ S, Q1 |. s& ]
@.Destination := assignLObj[1,row];
" q9 n' \2 {2 ?9 f end; % p: I6 c# `: b$ u7 O+ F) y8 v
newDirection(@);5 F* d, B, Q5 A# A* U
@.HasOrder := true;
% C+ F6 T" z+ w2 ?5 { end;
- O6 H5 D/ w8 l. }$ u end;
7 L* r; r# n: x0 Nend; -- of the method
* T1 a- u" X/ m$ b5 l+ _( R2 v- H |