/* called by: entrance ctrl of the object 'track'
2 t( V- _) k' l& f% S. I" G*/8 t# w6 q: I9 {' C) w$ H
is
n! B: H% w& H$ ]$ x) U part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 H" @* W# R. C, V: m: e3 ~8 Z2 L
do
; f9 o! R; a$ i" d! r% D7 f+ U Lan := rootfolder.Internal.Tools.AOLlanguage;9 W; D( N, q. N; [9 D% }3 y0 D* P
if current = @.Destination -- else return# w* n) X. f. A q g
then4 ?! B2 N' n9 V- d$ I# O
@.Destination := void;/ J& G2 ?% p$ r e# Q& V# A! {/ n
if @.occupied then
+ ?& f( Q q3 W4 @5 A part := @.cont;0 k2 E' c/ L3 V7 Y. j
@.transpOrder := void;
# f2 `9 Q( @& r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' s! Z9 }& C9 L1 S2 U% S6 E @,root.eventcontroller.simTime);0 A4 f3 N+ V. Z% a. Q E
@.HasOrder := false;5 ~" Y9 p7 b6 K# V( t- D
@.DrivingHome := true;
, e. ]1 P+ m @% M* d rgManager.tryToStartTransOrder;
6 ]( z2 G; X& @, T7 z if @.Destination = void
1 Y' {% {9 y1 R5 ^ I9 \) G, ~, X% r then -- no transport order for vehicle @$ d# B8 C' a. ` e0 T
@.Destination :=
4 M* A* V: |" j1 J0 K5 z rgManager.nearestFreeStation(@,track.~);, p3 J8 \" j2 G% }
newDirection(@); * {4 h. b% G+ s1 k Q4 B# w( s: a
if @.Destination /= void then# r2 j4 w% A5 b8 W P1 q- Q+ h! o8 P- ]
@.Destination.NumReservation :=
7 |5 g. R+ o7 g @.Destination.NumReservation + 1;8 m: H3 t9 Q5 v% g7 k- |- Z9 L
end;
. v8 r8 j6 b& h7 \& f2 ?7 r @.CurrIcon := "drivingHome";. w( w. A# K& P5 W, k& S; ]% t N& q
@.DrivingHome := true;
8 s+ C6 N, K" C/ h, J6 @ c# j) D3 s end;
) Z7 Y# y( B9 v; C else -- the vehicle @ is empty, both vehicle and part are in the same dock station) H! k" M- r# q. D
part := @.transpOrder;2 l) `$ @9 W- o' Y8 C ~8 E
part.move(@);-- load part
. ~3 a, [) f2 l0 r/ m% ]/ \- O @.CurrIcon := "load";: e! U( E Z+ f+ b. w8 `7 j
GlobalDistObj := part.globDestination;! p9 _5 V+ y! {" k
assignLObj := rgmanager.rgAssignL;' S( K- H4 h0 Z& x7 h# ~
row := assignLObj.getRowNo(GlobalDistObj);; {9 j& D( ^- M+ x0 T
if Row = -1 then -- since 70
# }, L' U$ }( l4 S0 W2 e" p3 X: v if lan=1 then
8 N" M9 U) x* l6 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% o+ q v5 y: V% ?" [+ v
to_str("in der Andockstation: \"",?.~.name,"\""));
) S) T# h7 A- U( ?" B$ U5 f F2 X else
+ [% t1 b9 d) d5 ~% j$ q; z/ u! ?1 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: X5 |- t) r) P |
to_str("in docking station: \"",?.~.name,"\""));
7 \; m0 T3 k& ^1 f* ~4 n end;: g# C" y: g6 r1 y6 Y F
else
* M( ]4 N3 b$ c- v0 n! s @.Destination := assignLObj[1,row];
2 ^1 |: k+ D5 X6 \* H h end; ! ^+ V3 ~/ o& i u& U Y
newDirection(@);
& Q& ^7 p' @3 E c/ |; E$ C @.HasOrder := true;2 H/ y# \7 r! @! C$ D( B& z
end;
0 `. [4 X) ]9 e$ N end;9 D* s! [8 f" F
end; -- of the method
2 }3 e# w4 M: S6 ?8 A# H5 d/ I |