/* called by: entrance ctrl of the object 'track'
/ n5 K/ X" C- s v" _! O*/- u9 [+ G: b, B7 U3 H3 G
is
! C6 n+ U- `( o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. Q+ I+ i2 [+ v/ Z. ]0 I! T+ Tdo' v' R( }2 n* G2 J( R
Lan := rootfolder.Internal.Tools.AOLlanguage;
* e d, j: J( N0 W2 L% |+ I if current = @.Destination -- else return
0 J1 D$ d9 }: q* i* H then+ M5 B6 G$ Z- B' N2 `: C6 z
@.Destination := void;3 Y8 v' y; l& J
if @.occupied then
$ C8 J2 U8 q# z5 I5 j part := @.cont;/ X" T! { S2 v0 X# U: \
@.transpOrder := void;
1 S9 z3 _* o% o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ p3 z% J8 f U, S+ `" A9 Q
@,root.eventcontroller.simTime);
- L9 ]: z) [* }5 w ]- K9 j- H @.HasOrder := false;) C5 G6 ~: K0 N6 S# b
@.DrivingHome := true;* k2 |4 s& W& J% ]+ V
rgManager.tryToStartTransOrder;& c& \+ Z' w3 ^+ k) h: ]- F, N
if @.Destination = void4 i4 } G; D& ]/ ^3 \* S, O
then -- no transport order for vehicle @$ k" T9 S5 q8 F7 G- T2 R
@.Destination :=: k7 R/ v- q* l/ f/ z
rgManager.nearestFreeStation(@,track.~);# A/ `% C6 I I3 V1 \% e) r X
newDirection(@);
, N0 R& d5 @6 [/ G1 w% { if @.Destination /= void then
; R; y; E) e* z6 x @.Destination.NumReservation :=
$ n x: v5 k' S2 z3 Y! r @.Destination.NumReservation + 1;0 Z- ]& W* V# [$ p4 W
end;
% |5 ^" @/ Y6 L) I2 V3 I @.CurrIcon := "drivingHome";& X' ?0 p& A* L# K4 D& @
@.DrivingHome := true;
( L/ J7 K0 u- e end;5 ]1 B$ q- X+ X' M1 @; D8 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& y( l+ g3 s- R8 o$ s& H part := @.transpOrder;
) m9 ?; j/ A' e. Z2 N7 H part.move(@);-- load part4 h$ M1 S9 [) f! ?; R) w/ A
@.CurrIcon := "load";
6 v* d3 h/ k. k$ G e p E9 N# B GlobalDistObj := part.globDestination;$ m' P6 J+ l3 C5 n
assignLObj := rgmanager.rgAssignL;, g j$ o$ v; j1 [* h
row := assignLObj.getRowNo(GlobalDistObj);
* A4 Q( k" K/ Y" p# P. J% A if Row = -1 then -- since 70
* \1 |0 g) o! e if lan=1 then; B5 ^- O* x' b; G/ e0 r( v4 C+ v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" m# ]& L6 R/ x" {% s to_str("in der Andockstation: \"",?.~.name,"\""));9 r6 c D) v2 Y2 k5 T: x
else
4 E1 p) B" f( f. F2 r! b8 R2 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# \, u: P/ I7 L$ U# x* ^
to_str("in docking station: \"",?.~.name,"\"")); [1 v3 r" @/ E$ z t+ ~4 ^
end;' }& C0 [8 t( @: n2 D, `' t
else
. z9 x1 _+ x& J4 ^" Z$ U8 _( b# ? @.Destination := assignLObj[1,row];
9 N+ b, h8 J. F( s$ Q end;
9 [( J: y% w. H" t( P newDirection(@);
c# H& j0 E" n1 f7 T5 c @.HasOrder := true;$ Z% n* l; A1 w' y, c) e
end;
* x, z, u' L v end;% `& A1 n$ a+ I3 G- E
end; -- of the method
9 J9 v5 R& C! O5 w |