/* called by: entrance ctrl of the object 'track'
/ ? r Y7 M6 j% b" e*// Q, X; o( E, z4 ^' [/ a/ r* d
is
( p P/ R' L$ j5 S, E, M9 S6 y2 p( i part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ h/ o( D: O2 X/ ^2 c2 c
do+ ]+ C' X6 I) F6 _# p) m
Lan := rootfolder.Internal.Tools.AOLlanguage;- E9 n4 q1 R! S( i* L) W
if current = @.Destination -- else return) `* B, x0 h% Q6 _ {, C
then
1 @! D1 E7 O3 h& }: I @.Destination := void;
; \* M# z+ U( } if @.occupied then
5 L+ u1 r0 e1 M, U; I+ c part := @.cont;/ D' p' p( m- W+ M% B
@.transpOrder := void;
0 I4 p1 `+ ^2 j3 j: X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& P! U$ [6 d5 ?/ b' K% k4 r7 Q @,root.eventcontroller.simTime);
r( y! b5 Y) _2 @$ W' q. E7 c @.HasOrder := false;
2 m1 L7 ?, Z; R1 i# @% E3 c2 j @.DrivingHome := true;
+ ~5 X3 T+ f6 T$ q W3 J. z! b rgManager.tryToStartTransOrder;; w+ {1 _0 N, v! }- z; U3 e
if @.Destination = void' X1 m% }6 c! }; ~
then -- no transport order for vehicle @1 d9 x. d# D' e2 n9 }" T7 ~7 T, C
@.Destination :=$ c% q* q/ K0 T) |$ c4 n
rgManager.nearestFreeStation(@,track.~);
0 A2 n& D r! b# Y newDirection(@); 2 d+ V" ^/ T! V X: [7 D
if @.Destination /= void then
/ q) Y# `7 }7 o. Q @.Destination.NumReservation :=& k* Z/ \1 _5 H4 J) N2 Q
@.Destination.NumReservation + 1;0 v! r0 x: G( _) |( q; M9 c8 k1 o
end;
" c2 K) U# a ~0 ^6 o @.CurrIcon := "drivingHome";" K! E2 l, I0 Y9 b0 W
@.DrivingHome := true;. e# f% l/ s: Y1 x' z2 e3 o
end;3 u4 ~8 x* e' O0 Z7 D5 n& p" s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: | J, v! Q* T* A( \ part := @.transpOrder;
g( X. l" ^9 I. N+ P; E part.move(@);-- load part
: z& K$ O4 z \" A( @ @.CurrIcon := "load";
* |% Z1 I1 b3 y) Q" Y( B GlobalDistObj := part.globDestination;1 v/ D7 |7 c* A& A8 e0 j
assignLObj := rgmanager.rgAssignL;
! [3 i+ P' Q( s, |% V4 k2 n row := assignLObj.getRowNo(GlobalDistObj);5 J C1 m; O. t- m/ A
if Row = -1 then -- since 70
* t) f5 C, c2 k% l4 Y$ o) K if lan=1 then
$ C, S$ U+ i; k5 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
R6 I1 h. F" M; M$ r$ S to_str("in der Andockstation: \"",?.~.name,"\""));- S" N6 f9 g* ^: h; g
else
8 ?/ L$ m' R0 F* q5 _& S! ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 J6 I4 _- v g w/ p2 D3 E to_str("in docking station: \"",?.~.name,"\""));
; V/ r3 _* g0 [; ^0 A ?) [ end;3 _- K+ ]3 w! r, m
else
7 r$ l2 k4 w6 q# g2 U3 H9 N @.Destination := assignLObj[1,row];
6 L) a5 Z' P7 J+ t+ ~ end;
% i& Z) l# I" r/ b/ f newDirection(@);
& M/ Q3 C% t5 i7 Y @.HasOrder := true;" w* c: n% i5 [: D. t$ o; m
end;" e2 q" h' c/ L7 {4 a- J- F
end;
; i9 u3 F7 E) y) _' q" o, uend; -- of the method6 {* M% E# X5 d" E! p. O! D
|