/* called by: entrance ctrl of the object 'track', [- u1 P* I3 C! V: P
*/
v: G9 m6 K% m& G! _is
4 p4 x% B% l3 Y- G3 p0 @8 R; P4 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' k1 I) d K+ Q! fdo2 A' D& I3 Y! W3 p1 D P
Lan := rootfolder.Internal.Tools.AOLlanguage;+ q' ~! R* ^5 I0 Z/ Q5 Y
if current = @.Destination -- else return
7 C$ i( x2 P4 v+ d2 S% I% ` then8 O6 r+ ?( U( n3 `9 x
@.Destination := void;
' w' I2 W! R; w if @.occupied then4 C% ~( b& L% o8 e
part := @.cont;8 x8 P6 P4 ~2 j" R
@.transpOrder := void;& ~, l/ ?* J% v6 o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 H' F4 I4 d i. p# d2 s( s7 B* j( Y8 y @,root.eventcontroller.simTime);2 R) c' J- T5 w. T# c: }0 L
@.HasOrder := false;
: [6 b: y, m& _" Z0 [2 h @.DrivingHome := true;5 l3 l; d @7 f; G# I1 P9 a
rgManager.tryToStartTransOrder;2 g% U2 n! _' R# p
if @.Destination = void
1 l$ x: w ~7 g7 t5 \ then -- no transport order for vehicle @
" O I, ^% W- f4 M @.Destination :=4 I+ s5 T) P) k7 z+ y
rgManager.nearestFreeStation(@,track.~);6 i8 U* u1 x7 `# f+ B
newDirection(@); 0 ~1 F/ q" I! I; r( ~8 R
if @.Destination /= void then
1 M2 {- f1 m8 A- T @.Destination.NumReservation := K) f) Y, J& q& n$ x
@.Destination.NumReservation + 1;$ J/ R) o$ J. _+ ?. v4 G
end;
! i; w) Z. g+ { @.CurrIcon := "drivingHome";
5 B8 l5 u- n1 b; r# ] @.DrivingHome := true;
n9 N$ ?5 ^/ h2 L end;
) B: ?& S! s: [& P$ I8 S/ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station( L5 R- A+ Q, x4 R
part := @.transpOrder;
) S/ }' R9 E) i: v* i* N part.move(@);-- load part
( _9 g% o& M1 v) R8 c/ K @.CurrIcon := "load";
' q% p% P) g' ` {8 E GlobalDistObj := part.globDestination;+ t! ]. J U4 Z0 Z; C: v
assignLObj := rgmanager.rgAssignL;
5 Q$ w- U: ~( S+ B row := assignLObj.getRowNo(GlobalDistObj);
3 k0 T+ q x( f( Q% T+ B, L' P if Row = -1 then -- since 70/ y6 S: M4 i/ T
if lan=1 then
( e9 @! `# \+ i) P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" h* O0 W! G' R+ w: w) H+ v to_str("in der Andockstation: \"",?.~.name,"\""));+ ?5 f" K% Y/ o- b2 n* X
else
# z, y" f K3 o1 K7 p9 u6 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 G$ K- ]6 x. q L+ F$ D
to_str("in docking station: \"",?.~.name,"\""));
% i0 \$ f1 f3 G/ Y4 [6 G# w end;
! k6 }1 S6 R' ~0 q' `8 J* F else( \# v) }1 {+ X
@.Destination := assignLObj[1,row];4 ?( g/ _! y6 t+ ?1 G+ b
end;
4 b3 C% Z) y/ c: M newDirection(@);
& g4 u7 Y6 |% M, f6 e$ R2 h& E- V: S @.HasOrder := true;; s$ O0 b, K; t* x# R! M
end;
: U* i$ U. }9 [4 ?- h: s M end;) e" [% k8 @( n; t
end; -- of the method
% q- H5 q" r. Q1 V, }& V |