/* called by: entrance ctrl of the object 'track'* N r% I1 {* i% e- A: W) ]
*/, M7 M# R' k3 T* s" t% I" m# N
is
3 o4 f, `5 N+ Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;! E! k: k, |! K" I2 X7 e
do
( w& W0 l9 d9 R# A$ B7 \2 U Lan := rootfolder.Internal.Tools.AOLlanguage;
- A8 c2 h1 }. I0 a! w( x if current = @.Destination -- else return/ {: V8 z+ D6 X- a6 |
then
% F9 _5 A1 B: j @.Destination := void;
h+ Q, A0 w6 ^; g q5 @4 X if @.occupied then$ o2 w+ J \. D0 K" |3 a: ?
part := @.cont;
4 Y5 ?: N, ~( ]9 F @.transpOrder := void;
9 s' ^( g: Z. c' _* c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 t8 C7 U& O' C1 ~! T @,root.eventcontroller.simTime);; m+ i& \4 R! X$ m: O: W3 m
@.HasOrder := false;, b; M. z. T2 H4 ^
@.DrivingHome := true;$ y$ ?+ L) z3 P8 o) J
rgManager.tryToStartTransOrder;
4 E2 Y) M; E+ u# W if @.Destination = void9 r) O+ b5 A5 t8 H. j' A
then -- no transport order for vehicle @" E) ?6 t3 }7 s4 X: u6 ~: U
@.Destination :=7 i X: K' {0 Z* j+ z/ U# z
rgManager.nearestFreeStation(@,track.~);6 q+ O7 H8 M0 P$ V' M. A
newDirection(@); ( {/ m5 \% r7 p7 a' `2 I$ T, D
if @.Destination /= void then
2 ^# a& F" i4 H/ r2 t* h. }" _, Y" n @.Destination.NumReservation :=
" r: v4 F7 T: K3 A8 ]- G/ u$ m @.Destination.NumReservation + 1;! }" k; g1 G$ O2 k: J7 v
end;
7 ]. b2 o6 f/ J. G& Z, Q+ U, M8 W @.CurrIcon := "drivingHome";- g5 k* ]. D) I) W" t$ e
@.DrivingHome := true;
$ A. l5 U& Z' g; e* V; Z4 D3 S9 U/ I- k end;
; P, a, t( h+ U3 N; ?5 g& {: h, Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 d% i+ f/ F# I* p8 Y
part := @.transpOrder;
. b' r7 j( r4 D+ Y8 J part.move(@);-- load part
& b' g ]6 _8 Y3 y( L @.CurrIcon := "load";
+ {7 [5 U! R) w! z GlobalDistObj := part.globDestination;
# d6 ~6 G3 W4 e assignLObj := rgmanager.rgAssignL;
. t& P* a5 w5 y$ ] row := assignLObj.getRowNo(GlobalDistObj);! Z4 o6 q; e# B; g5 h4 ^ C
if Row = -1 then -- since 70! O) q9 G- v: P7 ^
if lan=1 then" a$ h( Q; h; }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 N }" c. G5 e: D
to_str("in der Andockstation: \"",?.~.name,"\""));
. c2 q0 y5 B) ^, o1 c7 Y else8 Y2 o' W- R7 P7 z3 T4 |: g% r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ d1 |1 i) b/ c
to_str("in docking station: \"",?.~.name,"\""));
* o8 [ g' U- }3 X5 o end;
2 R' n2 T- O1 R6 W' C2 O else6 A3 d5 {0 R/ Q* `/ i4 ~* h; T
@.Destination := assignLObj[1,row];
# z3 u) Q* `2 ^2 \$ t end;
" t: Z f5 G# m8 x% }1 w* { newDirection(@);
2 m. Q3 S+ X, ?. K @.HasOrder := true;9 G: ^0 v# f4 J) _- ?5 ] r, ?6 }1 @
end;
+ V9 q6 P( O% R9 O! G; R" i3 ] end;2 e+ t4 {' ?9 M x4 Z
end; -- of the method
5 B9 u& }0 Y: [ |