/* called by: entrance ctrl of the object 'track'0 O* O- } d. q
*/
2 L7 Y. b5 J* q/ i- y$ jis
: g, ]! j/ O* q part, GlobalDistObj, assignLObj:object;row,Lan:integer;# R- u5 i4 i9 ~
do
L8 g: \. M& B5 G. \( H Lan := rootfolder.Internal.Tools.AOLlanguage;( E+ o L; J( U9 e
if current = @.Destination -- else return
$ U/ F& K. }, g then
# w6 o8 Q9 X& u: x3 o% l @.Destination := void;; O; b9 Z- d1 y. S9 N" `' Y! S
if @.occupied then6 G# _8 z& S+ k1 l8 z9 a
part := @.cont;. F$ o5 u( ^) ~5 W3 [/ e
@.transpOrder := void;
+ G3 V# P1 }# \% @ b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 a4 u+ l$ W7 O9 U" z
@,root.eventcontroller.simTime);, ?3 u$ Z. x2 c1 i; L4 f/ h
@.HasOrder := false;
) j3 E2 T" w/ D% w; j2 ]7 ] @.DrivingHome := true;& g, s G1 v9 X% l' c' n2 |- k
rgManager.tryToStartTransOrder;
$ a! o) ]( @* F if @.Destination = void1 j, T0 G/ W" I( P4 A) J0 @1 l
then -- no transport order for vehicle @
" r" H5 c, Y2 y" b: n* s @.Destination :=
" ]! p* `! C+ c. h; f& _) } rgManager.nearestFreeStation(@,track.~);
6 _: t: I/ j$ K3 U- U) G6 { newDirection(@); 1 d8 n$ \. {( y) a& j
if @.Destination /= void then, y2 Y B; O. w3 x5 x5 Q4 X
@.Destination.NumReservation :=* Y# H- f! D# f6 s% G
@.Destination.NumReservation + 1;
; \0 l! h* f! X+ D" [5 l x end;
& I g! F* `9 m3 r ] @.CurrIcon := "drivingHome";
* j3 V, G. X7 s z8 b @.DrivingHome := true;
( W) x* r: K0 C" N" { end;
* r- C$ h' y% k4 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% i, P& x* [/ w9 S. u, b part := @.transpOrder;& g# V% E+ F& M9 Q$ y3 w5 @
part.move(@);-- load part
o4 ?8 ~, l) F @.CurrIcon := "load";3 f3 d% l2 I0 r1 T" E y) j
GlobalDistObj := part.globDestination;
8 T1 W* k3 Q1 _ assignLObj := rgmanager.rgAssignL;; Y. D3 y, O8 ^. [
row := assignLObj.getRowNo(GlobalDistObj);/ |5 B$ b5 \1 X' m6 B8 @( s
if Row = -1 then -- since 70- e' Z$ Z( {/ B
if lan=1 then
/ q1 E) d7 D# x( } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- s5 C: _* z' j" f& N to_str("in der Andockstation: \"",?.~.name,"\""));
; f1 ~- q; D- t! @2 X8 |& a else/ K) y# {% X/ R$ [( }2 n& [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) i8 z& o) Q9 ?% `# o( G0 O to_str("in docking station: \"",?.~.name,"\"")); % W0 K4 }' E) f& I: t$ G
end;
, z( j6 X* m, R' b7 q else
% a/ Z8 L& D' q) [! {& @( o @.Destination := assignLObj[1,row];2 i# x" W9 N0 ]: F+ i5 v* \( ~
end; - K7 q Y& o" O* g0 M
newDirection(@);: o Z0 ]; R$ q3 p
@.HasOrder := true;
! b: [0 C; y7 ?/ A4 b6 O0 t) a end;. G7 H0 I) @7 S% ^5 I
end;6 W, `$ F2 T3 `* U8 q B
end; -- of the method
y: r2 o+ v' X o! l8 I |