/* called by: entrance ctrl of the object 'track'
4 T5 q" e: w, F- {: N*/
% ^# x# }- }8 n6 W& C4 L' his) V' ? c9 L: {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* k0 m# \$ A0 c- S' ddo
4 V* |. \$ z/ y( ]. L Lan := rootfolder.Internal.Tools.AOLlanguage;
% Q! y+ M4 x. ^/ q+ H1 q; \7 ` if current = @.Destination -- else return
2 u% f% |9 [9 K/ D4 H/ O then) M; _, F3 H) \! j
@.Destination := void;4 Q# @& t9 v1 s2 H
if @.occupied then
7 x8 {+ J( u9 d' i5 C part := @.cont;
- V% _: s6 N; T7 n3 g. I @.transpOrder := void;5 V6 Q6 B1 G' X: o4 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! e e& t, U$ H7 a9 x) N/ X
@,root.eventcontroller.simTime);: [" b/ N7 x4 j9 s8 H: I$ \9 F7 x
@.HasOrder := false;2 P1 n/ g8 }8 b7 ^) U) {4 Y: S
@.DrivingHome := true;% [6 a( {9 |! K& F& O
rgManager.tryToStartTransOrder;* x3 [4 \1 N5 p9 P: M
if @.Destination = void
% D2 N9 c# B+ ~. X: k% P. h then -- no transport order for vehicle @! t( Q2 P R4 J) o5 d4 g2 p n
@.Destination :=
% ^5 g/ a% R* v: _% G$ N rgManager.nearestFreeStation(@,track.~);
" D: z% U6 J2 a" T1 m" w newDirection(@);
1 O# ^/ F, U8 h) \2 |* \: O& R4 R if @.Destination /= void then
$ F0 f' C5 v/ d% R- x9 B; F* o @.Destination.NumReservation :=
: G3 H9 k: c: q6 e @.Destination.NumReservation + 1;
5 u5 {3 x+ _9 ?, |# e8 r+ m6 D# c end;0 T; x9 |+ ~* { C- g' u3 y5 |
@.CurrIcon := "drivingHome";% \. B2 W* @3 W
@.DrivingHome := true;4 w( P! {$ Q, t- |) `
end;7 _% p$ c/ Q! I" O5 B( d4 `# b& r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: l2 j W0 n3 I part := @.transpOrder;
& Y% a) f3 R; u' s; C part.move(@);-- load part
) ~ l* W2 U; u @.CurrIcon := "load";
9 T) C3 P; g, k3 v9 k. z) n9 v( f GlobalDistObj := part.globDestination;
. V* C; g; Y% u ]# ` assignLObj := rgmanager.rgAssignL;. ]8 ^( ^6 }7 W
row := assignLObj.getRowNo(GlobalDistObj);1 \9 s5 P5 _3 \' c# ?
if Row = -1 then -- since 70 w! ~! h1 i$ v( R G3 B
if lan=1 then
5 }' H7 x7 D" u$ x) r3 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 {7 z, g' b5 _' x$ ~
to_str("in der Andockstation: \"",?.~.name,"\""));1 H3 x5 z7 r' ~$ b" [- J
else; a1 I. i3 f$ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* }( L* y: i7 d* i- |, C to_str("in docking station: \"",?.~.name,"\""));
* H+ a/ G+ Q& @ end;( T# M5 s6 z f( P5 g0 B" L
else! |( V6 b/ X# K( {) h' s! _
@.Destination := assignLObj[1,row];
7 c7 _# q2 L4 Q! L+ s end; 7 T* Q# _) b; w; r
newDirection(@);9 v' x( n# {7 Y. X
@.HasOrder := true;9 f6 Y3 W4 S$ \8 z8 R; @
end;
& w4 q2 D ?( s" J" v8 I7 k6 c end;! e' h$ R& B7 E. g
end; -- of the method; c8 I( H$ D7 h% o4 C
|