/* called by: entrance ctrl of the object 'track'
9 V I5 [/ d: |1 Q8 l: d; @*/
4 v9 X. a5 z w( T7 k# ?: |% ?is
0 y1 d# G3 m8 i7 p. }: A$ d0 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 f4 d& o1 f4 ~/ Z0 mdo
" p* i ~! Y* q: x6 L+ W6 J8 G1 ? Lan := rootfolder.Internal.Tools.AOLlanguage;- S1 g- f! \& M. H1 ^
if current = @.Destination -- else return
# u3 p, _" H7 G5 H, s K then7 A( H4 D: `1 }) a+ j5 }
@.Destination := void;
' C' D4 K9 r( p' v2 Z2 f$ c if @.occupied then8 K5 g, H9 `/ n% W5 C9 i
part := @.cont;! B- i7 Y& S4 v3 O3 V2 p: j
@.transpOrder := void;: D4 z [/ Q4 D8 ~7 M' y7 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 d' U6 r8 A& T+ ?# h- M; \
@,root.eventcontroller.simTime);) h" A( A0 n) a
@.HasOrder := false;
_7 K* V- l- h: r$ ` @.DrivingHome := true;+ @' ?# e: | S* c _! I; J7 h
rgManager.tryToStartTransOrder;/ v x$ h8 H$ n5 H" b) }6 h
if @.Destination = void
, W7 e5 Z3 _4 o) N: j9 V" h& x then -- no transport order for vehicle @/ ~+ x3 o' f V% G! t! z" {
@.Destination :=& t/ o, D; @; \! n8 }- ]- n
rgManager.nearestFreeStation(@,track.~);
" I3 R+ s% u, ~' H1 x newDirection(@);
% X! M2 X' u/ e& g* B if @.Destination /= void then# ]- Z E; E& X4 |- ? D
@.Destination.NumReservation :=
* i& u, l- b# t5 E @.Destination.NumReservation + 1;; ~- ^; P4 l; A( Q, [
end;
* {) O" W) E" [# \4 ^ @.CurrIcon := "drivingHome";
& o) C \6 u$ v @.DrivingHome := true;/ r8 S2 P2 M2 T3 d* u, X
end;
' A7 K( s3 L. [3 V" @6 q1 c' c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 D' q, h2 Z- t0 g0 X part := @.transpOrder;
, l( k. a, ?9 R9 ~4 a7 \- g' Q part.move(@);-- load part, Q! y) d& C& a1 ]
@.CurrIcon := "load";* q4 d9 l8 L9 a" o% K/ e
GlobalDistObj := part.globDestination;) K/ A( t) A; V V
assignLObj := rgmanager.rgAssignL;) p! F* J: V* z9 C3 Z
row := assignLObj.getRowNo(GlobalDistObj);
3 H: U2 d' A+ S, k; M8 T$ O. d if Row = -1 then -- since 70* y5 l( p7 ]2 |9 S0 V/ o! b
if lan=1 then" X1 f9 P5 H6 |1 R0 L$ r1 z& g3 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
T0 P5 f* b% r- ?, S* z to_str("in der Andockstation: \"",?.~.name,"\""));* s( a9 ]) n# _" X
else! i0 I+ Q0 v0 `! k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
X; n: t1 y* ]% p8 }2 a to_str("in docking station: \"",?.~.name,"\""));
, k+ A: l. ~6 Q& r* T+ L# B' { end;
# Z( x( M- k9 B: l, U* k! ]6 \! e2 J9 U else% J9 p& \/ F, Z N! b, h4 K
@.Destination := assignLObj[1,row];
+ K1 g3 p9 q; n, @8 w g end; 6 P/ O, z( k( o% S( S
newDirection(@);
5 l. `3 M4 ~ b: T* T* x6 ] @.HasOrder := true;. V$ h7 T& ^" D" Z) @6 S
end;7 q% c* f+ g4 `, d
end;
* r* F" J9 y, y& R5 \% n% e' Gend; -- of the method
, \9 |! ?, |# p |