/* called by: entrance ctrl of the object 'track'
/ N$ r3 Q5 j* a( r7 J9 @) }*/
# F0 S m$ j5 A+ zis
$ I# y3 x& X, a0 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;' W9 K" a/ p5 Z6 |! i1 A
do
* S. e7 G* b8 r# z% ^ Q Lan := rootfolder.Internal.Tools.AOLlanguage;+ n8 c( C# D: r
if current = @.Destination -- else return! E+ ~5 j- c8 _: N4 z# M# z6 l4 q
then
! Z- s9 K& o& \3 c @.Destination := void;
9 w; G# ~8 O8 \1 u, I8 H( z if @.occupied then% O: l' _3 ? B. G
part := @.cont;- I& L9 d7 q+ f" c
@.transpOrder := void;
9 h6 i% x" e! F: D$ a5 I+ O; d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 ~: Y% m6 x& y' D' G- [6 a' T
@,root.eventcontroller.simTime);
9 A, U! X9 L% w9 ? @.HasOrder := false;
. j9 _ u# i7 Y6 j @.DrivingHome := true;
, a$ i$ M) P* b* X) J rgManager.tryToStartTransOrder;" I Q+ M: b3 E+ ]
if @.Destination = void, n1 D- T, ^& m- x& o; G3 x
then -- no transport order for vehicle @& a0 I1 V2 t% _: O
@.Destination :=) F; c( ^+ j, h/ h4 a
rgManager.nearestFreeStation(@,track.~);
) ~' r% U: W! E7 w+ \, B newDirection(@);
# B2 h- x; @2 A+ r, _ if @.Destination /= void then' M6 X3 F9 q9 H1 [* c+ A
@.Destination.NumReservation :=
`# n3 p8 n! d1 f. b) i @.Destination.NumReservation + 1;
- Y6 \1 h- j1 d0 g. |5 p: T end;
5 m# Z& T8 F9 y0 \% r @.CurrIcon := "drivingHome";3 G, G) c1 ^9 J% c
@.DrivingHome := true;
. }4 J( H, z' }; S2 {/ M end;
; _. x* H) | ?' A6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station; t* W4 X8 n+ K3 Z3 t, d
part := @.transpOrder;
/ l Z6 P/ J, P s* R part.move(@);-- load part
9 Q" G; b) M) e2 i @.CurrIcon := "load";
7 m4 V2 k7 `2 W& w GlobalDistObj := part.globDestination;
) N% i1 @. o/ M+ K2 C assignLObj := rgmanager.rgAssignL;5 ^: Z; I- E6 Y$ X9 z* y! O1 g
row := assignLObj.getRowNo(GlobalDistObj);( t" G/ }/ r+ ~9 t% B$ d
if Row = -1 then -- since 70
; R; Q/ L$ U5 r0 t* G: h+ a if lan=1 then) U) Z1 J+ @6 y. T7 }+ ~5 z% W* \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& t# }8 a p" V/ Z+ ~
to_str("in der Andockstation: \"",?.~.name,"\""));9 s: z9 ^2 x8 r# Q5 R( p
else
4 H2 z, p1 d8 |% }/ H# n5 \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 j8 O8 G! |' i6 P to_str("in docking station: \"",?.~.name,"\"")); + ~8 e$ \1 i: L
end;$ g0 s/ Q4 A- c! G
else+ J! \ n& K3 E2 ?, U
@.Destination := assignLObj[1,row];
; b9 m- [2 o- G ~7 Y" ~ end;
. ~) e8 d5 H9 W newDirection(@);4 r- t2 ~, A9 V# R$ ?
@.HasOrder := true;0 q' ^& L/ i/ t" h9 H: k
end;8 _# `; Q- w' v# n( F: N+ j# E% J) i: e
end;5 h$ V' X& `0 G/ i& G) ?9 ~4 |
end; -- of the method/ b6 b- L( N# V# Z( x# L
|