/* called by: entrance ctrl of the object 'track'- R; N& p4 s8 u5 M6 r
*/9 u$ w! m, b+ @' g& a
is" P. h) E; f: _9 I+ _( N2 F; K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# U# G w0 l% q; ^2 C! k7 G
do7 h6 s( M3 K! \% [. j' v
Lan := rootfolder.Internal.Tools.AOLlanguage;9 w! @, D, O" Q1 @. a5 N. m
if current = @.Destination -- else return9 ^: R; ]+ t3 O e0 U
then
) d4 \9 X! v" M+ ^ t4 G8 g8 u; q @.Destination := void;3 ]- n4 }% S+ u1 ~9 s
if @.occupied then
0 f4 A* H5 p5 f [7 U+ h8 z) \ part := @.cont;2 Y, a7 u+ p+ O6 d0 e# t3 o
@.transpOrder := void;; P+ K* J4 q' [- [9 g. _7 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% G/ \& J! h+ _
@,root.eventcontroller.simTime);! S. A6 u0 A$ \; n ^" u9 c W
@.HasOrder := false;. G. e" r7 g; \( S' Y" M8 V
@.DrivingHome := true;
. m }9 [7 c: H7 X" z; v+ Q rgManager.tryToStartTransOrder;8 h7 m" @, ~5 u7 A. M
if @.Destination = void" q: ^* n% y+ Z1 Z
then -- no transport order for vehicle @1 e- ?- i; i( q8 z6 j
@.Destination :=
) O$ X0 T" ~6 h" L& j' n" |+ G rgManager.nearestFreeStation(@,track.~);
M+ _: R" G4 }6 ^; t! n newDirection(@); $ c Q: r, e9 X/ p8 q! y
if @.Destination /= void then* \+ C; D- |5 l8 j
@.Destination.NumReservation :=# T3 @8 r- \. O+ v% l: x$ ^
@.Destination.NumReservation + 1;$ x( b* p% l* p' p$ C
end;% w4 ]+ |; y1 Y: Y U- s. v
@.CurrIcon := "drivingHome";
) G- @& x, i# B- F8 K7 o# k @.DrivingHome := true;( ], Y# v4 u% R; o" f$ `
end;1 v C+ \+ r% E6 ]% p* Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 f& j9 x0 W0 ~' M' s( V4 d* O part := @.transpOrder; N( X4 g. T5 q- w+ d/ _( Q
part.move(@);-- load part8 f; D0 k0 A) q* X4 B
@.CurrIcon := "load";
1 a8 _0 T: C; ~$ V# {! O* o GlobalDistObj := part.globDestination;
2 V4 \) l# z5 I* @2 V assignLObj := rgmanager.rgAssignL;
; s( M7 A- X/ b& P% x" {8 Q4 w S5 p row := assignLObj.getRowNo(GlobalDistObj);/ r5 i' r9 X0 w+ x/ x2 W; U7 T
if Row = -1 then -- since 70: e* ?, b. p5 j- E8 e/ s! t
if lan=1 then
* |* R. |: h, m% h0 J8 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 p# D1 P5 X( V to_str("in der Andockstation: \"",?.~.name,"\""));" v: E( w' \$ q
else/ x8 f; Q( T2 L' R6 ?, J+ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ?1 p# r5 R; u9 G" }
to_str("in docking station: \"",?.~.name,"\""));
" @# X8 Q8 S8 P end;
$ o* k, f2 F' q, _" X else
5 C0 Y C+ W( p8 k! H @.Destination := assignLObj[1,row];( Z4 E6 s7 h: m$ K0 X; ~' i A
end; ; s4 }' {; H' t2 Y; e
newDirection(@);
5 e! i9 h% s8 @4 M; h @.HasOrder := true;
8 a8 r/ C/ T& @* Q5 J. F8 |: f3 u end;
+ b" T' h3 u7 M5 n l, } end;/ Z6 y* ~9 |! I3 T( v) N
end; -- of the method. \9 a/ U3 l; h0 H
|