/* called by: entrance ctrl of the object 'track'
& o! L9 T* }) L4 Y! u* W B*/: g9 P/ q4 u9 |$ t: l
is
7 B& a# S; t8 G: A; B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" K3 c1 w7 x# v. g* Vdo
0 {8 y8 S, W, e3 n' _ Lan := rootfolder.Internal.Tools.AOLlanguage;
3 J3 i6 l- s8 M% Q if current = @.Destination -- else return
/ R2 A W; O8 a- | then. {2 a7 k4 g2 s; Q0 d
@.Destination := void;
9 q! s5 L, X3 k+ P if @.occupied then5 X5 A5 s2 h, L' |# [" X& m3 t
part := @.cont;7 d7 y0 L, }( M/ s& i( b$ }, x3 {, [
@.transpOrder := void;
3 z# D# u9 @/ i' Q4 A0 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 _5 x8 A5 x+ ]3 h% {9 B! G8 Q
@,root.eventcontroller.simTime);
F* V, D% C/ w1 C! A, K1 B @.HasOrder := false;2 j F) }: r* p5 K
@.DrivingHome := true;
; Y& O' ]( H$ |* @9 z, f# [ rgManager.tryToStartTransOrder;8 o' o4 F8 H' [5 T/ O! N+ y
if @.Destination = void
& [. Z$ j/ r! f( |- D then -- no transport order for vehicle @
) p9 T0 I/ G! O6 I @.Destination :=/ [! I/ R7 N- n8 s! T
rgManager.nearestFreeStation(@,track.~);/ e1 M, u, g7 ~3 p5 x
newDirection(@); 9 F: r: A7 k; C) D6 h# Q( }* y
if @.Destination /= void then
3 p1 w& R+ D3 p3 S @.Destination.NumReservation :=
: Z; p# f7 N/ A. i m- v @.Destination.NumReservation + 1;; O( E# C7 j+ N
end;
( c! H# b1 D# P; }5 o* z @.CurrIcon := "drivingHome";
' d# F/ _% F Y: o @.DrivingHome := true;
) @' X4 }/ P7 H- r, E! a- G end;
5 c2 q7 t9 n: u8 \7 |1 z0 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 L) v+ g; i0 V# H1 h7 i
part := @.transpOrder;
2 W& U& N4 p; H0 w3 K. S ^ part.move(@);-- load part
$ R6 \: T2 N2 F* N @.CurrIcon := "load";. o# p& \2 y0 G1 Z" t6 r4 ^1 q
GlobalDistObj := part.globDestination;6 `: C1 ?, H0 [8 }9 _, x
assignLObj := rgmanager.rgAssignL;' w& Q! `5 y' C
row := assignLObj.getRowNo(GlobalDistObj); W, h( ~* \5 ^9 d) p8 e# ~# W
if Row = -1 then -- since 70; ?& u M9 g/ i$ O, S0 B! s
if lan=1 then" ~2 [, J3 z! Y/ z$ i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' b* r7 I8 S5 ^; \* p to_str("in der Andockstation: \"",?.~.name,"\""));% D) Y1 |8 |* g
else2 P6 n% i$ }9 b9 P( t6 `! z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ x! K8 O2 z3 D; R' w
to_str("in docking station: \"",?.~.name,"\""));
3 C# g: K$ F/ `" _. V r4 l end;, G% }; n4 K/ v# k
else& j4 y5 n) n3 I4 ~/ f6 ?! @
@.Destination := assignLObj[1,row];
! }0 e/ n+ R: A. m9 [; D end; . C/ p( |: c3 @; E' d5 f; ]- B
newDirection(@);
0 f: |& D) O, H$ K0 g @.HasOrder := true;
; ^% V; M& q# K) Y end;
6 N$ L5 s- O+ \( p& h+ i! i end;' s$ q: o% }1 B: B
end; -- of the method
. w0 | c; p! r9 F d |