/* called by: entrance ctrl of the object 'track'9 d9 T9 ^" Q0 b: J7 t* _9 v1 }2 g4 K
*/% Y) ]4 _: y# x" S0 ~
is
) f- E- A7 V/ n/ m/ J: a part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Y/ r+ h! I/ g; S/ c7 a- U
do
5 V X% A1 \' s( r: Z& _ Lan := rootfolder.Internal.Tools.AOLlanguage;
6 n2 U! N) Q, S) M' d if current = @.Destination -- else return
6 ?0 I. r( Q$ L" \. \) V) s then" `' G+ n$ j& h; @7 s, T
@.Destination := void;' x* J8 i% c0 ?' M( i' x
if @.occupied then
9 G. w ]2 r$ q8 \ part := @.cont;1 I( i3 ~) ]. D" q }
@.transpOrder := void;
' d' f0 k( r. x# x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Z7 M8 M" ^( p4 o, O3 X, V- C @,root.eventcontroller.simTime);3 w) B; [1 t$ K; Q) M) Y
@.HasOrder := false;
9 x" [( R) N. M( y, C* u @.DrivingHome := true;
8 o' I) b3 {: r% I% M" B rgManager.tryToStartTransOrder;$ v f" y/ P K1 {( R
if @.Destination = void
5 B0 a7 m! y3 u" m, d) Z, p- q then -- no transport order for vehicle @/ s& u( p7 G: u6 T2 O* I
@.Destination :=9 m6 v% t0 u5 V. Q% a1 K. g
rgManager.nearestFreeStation(@,track.~);& \, ]9 x; e" n2 }5 c1 y5 w- ]8 L% v
newDirection(@); & M& o( B C0 V% v6 [9 J
if @.Destination /= void then
! j7 m4 g; C% p. o @.Destination.NumReservation :=
1 q8 Y5 Z) W; p P7 T" w5 N6 O @.Destination.NumReservation + 1;
9 J' S' J$ j1 N" K: R end;
$ O% Y: q) E0 G' Z( [6 w @.CurrIcon := "drivingHome";4 P8 w0 y, x& g- R& P
@.DrivingHome := true;, s4 z/ n% v; e& u2 g
end;1 p+ i1 t# T# `" I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E' ?# g" _1 m) R" X part := @.transpOrder;' W8 O$ ?' ^1 o; {) n4 {
part.move(@);-- load part
0 S# P$ r) g4 b' h3 E9 h1 I @.CurrIcon := "load";
* R7 f% B" _% b, X1 ^- h GlobalDistObj := part.globDestination;% Z5 G6 }" g' L0 J
assignLObj := rgmanager.rgAssignL;
: J+ j( C+ F6 Q# ~' Y! K1 I row := assignLObj.getRowNo(GlobalDistObj);
% t: L0 ^8 ]! `1 U( B; z if Row = -1 then -- since 70( P' A7 n& c% a" C/ p8 ~
if lan=1 then: b% m |. ^+ J$ b8 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ d# n: H# F$ w, L: q( |" W to_str("in der Andockstation: \"",?.~.name,"\""));9 K# H8 G3 H1 V2 x
else7 K' g. Q7 m3 J0 A# P& l. B; V) z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Y: j, {3 D/ n+ ~6 |
to_str("in docking station: \"",?.~.name,"\"")); & n" E+ ?( x/ |7 E, q
end;- z9 P5 u1 W- {' }% i% ]. K+ I
else7 c; _# T6 E9 L5 p4 T* l5 Q1 g
@.Destination := assignLObj[1,row];9 j A; ~9 N0 [7 {9 F! r5 U% m
end; * Z' o& N. K- c. B% k! F# V
newDirection(@);
\+ X: `; w. X3 c- ]+ f @.HasOrder := true;
# V4 D) `5 _4 }2 }5 C2 M, V end;2 p( H A5 [" J4 M( B
end;3 ^ k2 g2 i6 o$ ^3 @, K4 @
end; -- of the method
C$ \1 ^) P2 u8 D9 P% p; { |