/* called by: entrance ctrl of the object 'track'% T) C1 E5 W# q/ Y- w
*/
4 {+ Q5 T8 `( r+ Pis1 O4 L- A8 v. ~2 f# q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 A' E X. u6 D
do1 j9 U z: w+ U. ?' M" D6 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ a3 j" r, f8 R* h if current = @.Destination -- else return
0 Z! Q) ]; M) w! o; H: a& n5 n then2 f& T+ M3 ` S3 d$ G! ? F5 C+ y
@.Destination := void;2 |. k* C' b9 P. t$ Y# a
if @.occupied then
! e4 ^2 B1 t% K5 I% k6 U part := @.cont;
3 \! g6 s& h2 I @.transpOrder := void;
8 {% u' X% ~1 T7 M9 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 \1 i9 ]. Z. O% @ [ ?# z
@,root.eventcontroller.simTime);$ [/ g8 P% D! ]6 l% n' h2 \
@.HasOrder := false;6 D7 Q5 _* n- d5 }
@.DrivingHome := true;3 A: d0 z0 i+ P
rgManager.tryToStartTransOrder;
; K/ L' m) ^" i z# k3 d9 z: O if @.Destination = void
. y! H4 m% T" [/ x4 i% x& M s& F then -- no transport order for vehicle @6 ~" ~7 D4 a: O+ L
@.Destination :=' D s, |" ?9 V+ l( c
rgManager.nearestFreeStation(@,track.~);
9 z, G3 o' s4 k# ]# Y newDirection(@); 6 X; D9 @ W, {# @. Y
if @.Destination /= void then+ l. I9 n5 }1 V7 E6 C
@.Destination.NumReservation :=( I" Z; v) z: f% F' t" } H
@.Destination.NumReservation + 1;8 j( D% t% U/ i3 x
end;
/ w- [! A3 l6 {+ u# Q @.CurrIcon := "drivingHome";% R1 ]0 |9 `6 R0 k) v% Q
@.DrivingHome := true;9 G3 F1 `/ Z% `/ ^' f' Q
end;; x+ n- ?1 N# f, y9 Z( b8 k9 p6 r8 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( T/ m! x( Y- U part := @.transpOrder;
# m6 b! f2 E3 W! m' {" H* r. F part.move(@);-- load part" L2 v' }" A" V
@.CurrIcon := "load";
+ H! \9 n! S. L/ z1 y GlobalDistObj := part.globDestination;; T( ~0 c% E4 H6 p
assignLObj := rgmanager.rgAssignL;. ^$ i8 |5 s6 F0 D2 [& q) j
row := assignLObj.getRowNo(GlobalDistObj);+ |: n% B5 l$ O4 G9 A
if Row = -1 then -- since 707 G+ ~% @% {5 P: P# o, H
if lan=1 then. T% A V! _2 m2 X2 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& I5 _1 o, x9 X" @) M& y to_str("in der Andockstation: \"",?.~.name,"\""));: b+ i# Q7 }5 q+ X
else- r* y3 D8 k4 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( d; Y5 {- T2 z0 e4 h$ a! H
to_str("in docking station: \"",?.~.name,"\"")); ; [2 V5 z" d! N5 h
end;! G' R: K. v, ~6 N
else
& X& B$ b6 H' R6 _ @.Destination := assignLObj[1,row];
8 J( @: V) m2 h; R end; $ j: i8 T1 {+ i2 f" w
newDirection(@);' Y0 m- V) Z) r' y4 {6 x9 P. G
@.HasOrder := true; H7 t9 K/ N5 q. D: ~% n
end;; {" ]' u0 X8 B8 o
end;
& o$ V$ d: R, E6 M( q4 `! d! A4 a# `end; -- of the method
6 l, `6 p) ?1 ` |