/* called by: entrance ctrl of the object 'track'- o" B- S3 {; D% `8 c( T
*/* m" y: E Q3 ?) E# ^, h. w
is4 ?2 `" P8 b8 e& [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. A" [, V' F7 n: M4 Xdo
- w! ~/ r6 M4 H+ ?* M Lan := rootfolder.Internal.Tools.AOLlanguage;
$ Q# G1 b' R E6 F8 X* `. O if current = @.Destination -- else return
: M7 K( z, K' ^ then2 z6 b7 N5 C& ?* p$ P
@.Destination := void;
, ^0 m: \/ a2 d! R m/ ~ if @.occupied then
/ ~3 I" i6 Q2 p6 \5 V1 [ part := @.cont;
# j2 x0 v& Q2 r, ~ g @.transpOrder := void;
' C" G% W; ~) i" |0 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 @8 x. B" ^3 Y6 J4 x/ ^ @,root.eventcontroller.simTime);! r) J c6 [% x9 c" q4 {8 p) x
@.HasOrder := false;
3 v( G) \: m/ M; I- }7 x* Z @.DrivingHome := true;. i8 W" c3 n7 @2 b+ ]2 h7 a5 z
rgManager.tryToStartTransOrder; U& G# L- W9 y2 `1 q: q
if @.Destination = void
t! }! U9 R" q+ O9 d then -- no transport order for vehicle @
' @- N! ~0 B8 W) U) [7 S @.Destination :=5 X$ }& F* G' z6 g& U6 k
rgManager.nearestFreeStation(@,track.~); i0 Y; P8 h9 y" Q; ~3 E
newDirection(@);
: x0 J. V! H1 x$ _2 p if @.Destination /= void then P) G0 W U ~+ M% J5 s/ B8 @
@.Destination.NumReservation :=# q7 y% Q) P% c; z& j2 [5 y( L! f
@.Destination.NumReservation + 1;
9 G& N/ s [+ D- F& r# s end;
* X* o9 r! w% }0 m @.CurrIcon := "drivingHome";
. T4 S [2 ?6 N/ \( @9 N @.DrivingHome := true;: }; T$ m! Y- [+ [ X2 D
end;
0 O) C. k; I5 p% C$ ]$ V3 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' }, J( h: [- G: B* w9 R( j- v/ B part := @.transpOrder;
3 d; {' R/ G8 Y part.move(@);-- load part3 K5 M. L4 O. u2 B
@.CurrIcon := "load";
# B8 F0 ^* h+ G3 s' o GlobalDistObj := part.globDestination;
" L5 t+ T$ K7 ?& }7 d* E$ L assignLObj := rgmanager.rgAssignL;" N" N! F9 f* i# \+ p# _, N+ B/ K
row := assignLObj.getRowNo(GlobalDistObj);' a/ K: r! U f$ J
if Row = -1 then -- since 70% z7 P+ U( E5 Z* j' q, U; o/ u1 Q
if lan=1 then
1 l: B m$ s* A3 c6 x$ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' _; n2 [/ }4 g# W to_str("in der Andockstation: \"",?.~.name,"\""));5 X( b* e+ w' l* w' k- d
else) f8 \8 x- l" b3 U/ ]( x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- R8 u7 U/ G8 g$ |# S( h, j to_str("in docking station: \"",?.~.name,"\""));
$ m m! Y; J' j" @ end;) }$ E: ?9 e) R$ H7 ^' R
else
( R# W- ^6 Z, a @.Destination := assignLObj[1,row];1 }& h2 u" m! W; q+ t7 j
end;
1 m( i# J, @, |1 {+ T. y newDirection(@);5 I# w: Y" e- |
@.HasOrder := true;5 C m2 B% l2 c$ }/ I$ w" N% _1 ~# X
end;/ d3 |( s) @1 {2 w
end;) E3 x/ u; Z+ h% x: z
end; -- of the method
( H- l6 D# G. A1 c J |