/* called by: entrance ctrl of the object 'track'
$ B1 _! `; ]# {*/( w0 G; d' _- J* Z/ u
is
7 H1 K" h+ D1 g( O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ p' a, {7 x" v+ J/ M4 r2 i1 `2 B* d0 |do
' z; J6 i8 E2 J/ c2 o/ a8 m* m Lan := rootfolder.Internal.Tools.AOLlanguage;" J: _) {. @: h: q. {0 o- g
if current = @.Destination -- else return4 }( o8 R4 J# \7 o- }4 ^
then) x* [& s* R/ p; E3 _) j; [6 J, X
@.Destination := void; J n+ B7 s) `# b0 w8 {
if @.occupied then
- Y7 F, W/ J9 ^7 a! D: F* C; p part := @.cont;9 U% X) x! E, U5 I {, J
@.transpOrder := void;
( a2 f5 ~7 e. u9 y% q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, H4 ?# z7 P% q @,root.eventcontroller.simTime); d5 d% d! R! W
@.HasOrder := false;. E& Q5 E( i& _: b3 M8 p' W, e6 }
@.DrivingHome := true;/ P7 z) b$ G- }& l9 q
rgManager.tryToStartTransOrder;0 u9 c$ s% y- I( J8 Q, ^
if @.Destination = void
' C6 u, t1 H' g then -- no transport order for vehicle @
: _, C9 c% P, g @.Destination :=8 K2 B& `. q! s: d- b( H: j# ]
rgManager.nearestFreeStation(@,track.~);/ Y! ?6 ]) {. F
newDirection(@); y r% a0 \) }6 p$ E4 _
if @.Destination /= void then
! H- ^+ o: k$ s, |; A$ [! k5 {5 p @.Destination.NumReservation :=% G+ h6 @$ Q. `8 F( V4 [3 h$ a2 @
@.Destination.NumReservation + 1;
. L: P) r! o% r$ N5 ?: {" Y end;, e, H u6 [0 p8 M2 F6 r" S
@.CurrIcon := "drivingHome";
% [9 h8 z& W3 S$ I! L5 L' t1 Q @.DrivingHome := true;
( _, q" c* u6 L$ G& U( i9 {9 P& s end;# w, q, R$ a% x/ ]5 \4 N! p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Y7 h2 ^( p+ D- M part := @.transpOrder;
" s( I/ t0 k5 d5 U8 s9 X' C C! \ part.move(@);-- load part& f9 A. g8 _, a! x0 @* q3 ?( [
@.CurrIcon := "load";
8 b# R3 H% G. w9 b" D! g$ o GlobalDistObj := part.globDestination;
, G; `: B1 \" ^ assignLObj := rgmanager.rgAssignL;
/ E4 R; o2 `6 S" q8 }- Q row := assignLObj.getRowNo(GlobalDistObj); B& P8 |0 ?. n3 _, z
if Row = -1 then -- since 70
' A$ w+ `) a6 P7 B4 R6 J; h if lan=1 then* D4 o4 ?' L5 z' p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. c1 j9 G9 `- A# y
to_str("in der Andockstation: \"",?.~.name,"\""));
$ q y" @: [( o) }" j else8 A3 n6 u& x1 L2 J4 i9 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 A& c" g3 f; l$ m+ ^4 K: l1 ^% N) h3 N
to_str("in docking station: \"",?.~.name,"\""));
7 j" }: Y3 w3 c/ i0 ] end;8 q5 d9 T/ n$ I1 t) o( B" r
else2 Y% Y0 [0 \ o3 F& I& P
@.Destination := assignLObj[1,row];: L# Y2 X e2 r1 V& S1 x9 w4 R
end; 9 J$ ]6 d. i) O5 M6 p: s
newDirection(@);
& e* K7 Q* H$ h1 d* ], b @.HasOrder := true;6 l$ {; V( C* `/ w! n6 V7 ?
end;
. X4 r: n" {$ i2 X- Q end;
; q. A+ ~" L3 bend; -- of the method' l4 |9 u$ t: S/ @( m- `; { S* \2 c
|