/* called by: entrance ctrl of the object 'track'& {2 ]; G% ?* a9 j" r
*/
: H/ y2 b( c* {( @is* r+ `1 f9 d, {+ K( s0 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, t. l- ]' d. v4 ]do* `% A: \5 I% O
Lan := rootfolder.Internal.Tools.AOLlanguage;5 @; i! y6 |# m H9 k
if current = @.Destination -- else return
1 i" r1 D4 W# l h then
% B2 U$ e& o! g' B/ J% `1 F" h @.Destination := void;3 ?! \+ H2 R4 p, s p2 z
if @.occupied then
- A0 A" m3 T: `$ g$ Y7 S% V part := @.cont;
# N) \: q9 c) j% L @.transpOrder := void;
3 q9 C. Y! }$ ^ k, P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- N; n3 x# [8 o7 m2 ]
@,root.eventcontroller.simTime);
2 d& G8 o- D( z- B0 a1 H% M1 x1 M @.HasOrder := false;
; i8 V T! _* U6 y+ g9 o @.DrivingHome := true;
# ?6 g& B: \; C4 W/ k3 R rgManager.tryToStartTransOrder;; a) C4 f7 g: C2 j9 L+ M( C
if @.Destination = void
, }1 f/ R3 H2 w& i$ G1 a+ r- ~ then -- no transport order for vehicle @
Z9 o, d* z! }/ A @.Destination :=
! k$ v' ^6 g$ T9 n8 Y rgManager.nearestFreeStation(@,track.~);
6 E, z3 D% i' V2 i5 J; R! E newDirection(@);
% }& f) r$ i8 x; k3 D9 [ if @.Destination /= void then/ y* U2 W0 y% P6 k" X; y
@.Destination.NumReservation :=
4 P, I2 S2 U1 A# J @.Destination.NumReservation + 1;$ O* o1 J- ^$ O: g) Q$ d8 R& d8 h4 j
end;5 ~6 r' h& [$ n) @1 U# I N
@.CurrIcon := "drivingHome";2 d: Y& H y$ o5 y9 X/ B8 E
@.DrivingHome := true;% }) d/ I! {3 L% Q. z4 |& w0 A
end;* F" L! s9 N- |- f: l- V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 R# V7 q2 s8 P6 g% u
part := @.transpOrder;
9 e$ R5 w8 G: G$ x part.move(@);-- load part
+ d8 j7 _7 g5 ?/ K/ J' J# ~ @.CurrIcon := "load";8 `: b4 l) Q- [6 k
GlobalDistObj := part.globDestination;3 ^7 z( N& x+ [1 I0 Z
assignLObj := rgmanager.rgAssignL;
+ m' J$ {( X( Y4 I* n- g row := assignLObj.getRowNo(GlobalDistObj);
5 k. F+ t5 K7 L: H+ u/ ]7 t if Row = -1 then -- since 70
3 J- F; e$ C Y7 ]6 Y# d3 W if lan=1 then6 F- @4 I0 \9 b% T7 Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
Y' K& ~: B( z" d to_str("in der Andockstation: \"",?.~.name,"\""));
) L; i4 K ^: C4 c" [9 t. L else/ V2 U- y6 _+ M: l" K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% l8 g( b) e) Q# {. M to_str("in docking station: \"",?.~.name,"\""));
! l! } K; t; L$ C, Z end;
! b# X1 \3 {' D* w( @ else. \+ ]1 M$ }4 E7 [4 ~% w8 a
@.Destination := assignLObj[1,row];
4 y+ }. @ ~ G c3 X% l, X5 J* a& D, x end; % \/ i% ]& L6 K/ @/ o
newDirection(@);
2 u/ D0 i8 A# O7 p4 I6 G @.HasOrder := true;
* m/ Q' I: @9 }0 ?1 Y end;; r- z" k& u4 z, P( V; `: b
end;
& u. v- o2 P$ m' r: z. n7 i, O0 r; Aend; -- of the method
- v- p& S7 |: m |