/* called by: entrance ctrl of the object 'track'3 d; \, k$ T. j
*/" `) O% }" y) C, R+ i
is5 V9 e8 H* f7 k1 ?, E4 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ c' E* `, r7 y8 w g+ sdo9 F% ~/ s( W4 c n
Lan := rootfolder.Internal.Tools.AOLlanguage;% A: H# ~* O4 F5 X( f3 j" Z
if current = @.Destination -- else return
& E" a3 `% J3 s2 ^( p; `0 i3 ^ then
* w& h. A' [4 |: N2 ` @.Destination := void;
2 X1 p4 y/ L5 q: L if @.occupied then, [- r& k4 s8 ]/ S; ?! {& q
part := @.cont;
+ K& `- D: I7 x7 v @.transpOrder := void;; }: D/ H: c% f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 o f2 J7 k0 o# N @,root.eventcontroller.simTime);/ J0 l' r1 A) r }; p
@.HasOrder := false;& ?. ]5 u1 A1 [) g
@.DrivingHome := true;
6 X3 P+ Z: c" K7 o" z/ P rgManager.tryToStartTransOrder;
6 I, L I; Z4 f2 n) G* L if @.Destination = void4 E6 N* C# m7 p8 d$ x
then -- no transport order for vehicle @
" X6 T' y6 A: {0 @6 e/ j& c( ~ @.Destination :=9 f6 g! g5 E3 f7 j
rgManager.nearestFreeStation(@,track.~);
! f" ~/ A, u. E+ l newDirection(@);
) H- H$ z6 C0 o' s, E* I if @.Destination /= void then
2 P( Z* k6 Q$ a; n: n @.Destination.NumReservation :=2 g7 |4 v( O8 H2 \% P+ n
@.Destination.NumReservation + 1;" j2 ]0 F" v0 J$ m; W
end;0 _) l& M" ?) f
@.CurrIcon := "drivingHome";+ l, [1 o1 ?0 M" ?
@.DrivingHome := true;
6 E& G* o# {- p$ h) G end;
- r+ A3 R- `# a$ O8 A) x. t% A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 R3 T m9 g, S part := @.transpOrder;2 ^+ H7 s, k5 C/ ^+ Y2 O& ?( Q
part.move(@);-- load part8 d. Q& k' R9 W
@.CurrIcon := "load";
- ^) W% o! N9 h( s5 C' Y, m GlobalDistObj := part.globDestination;: a1 \5 M5 l: Q3 i% L0 A @
assignLObj := rgmanager.rgAssignL;
8 @/ a, U* C! q7 D/ A row := assignLObj.getRowNo(GlobalDistObj);
. J4 r, P; P1 z3 L( p, _. S if Row = -1 then -- since 70
- y# H1 u: G$ ], {+ s# l if lan=1 then
6 R5 R9 C0 s: @7 D! [1 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ E W7 H# u6 x; r to_str("in der Andockstation: \"",?.~.name,"\""));
6 s( W I% Z' v' T else
+ y8 E* h! Q/ ^; j6 ~* q0 w3 y9 h8 L/ ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' S& J' E, U j& }
to_str("in docking station: \"",?.~.name,"\"")); ' @- u9 D1 q( m; m$ s$ @
end;
( V4 h ?( |7 \ `: [ else" D t) H+ ]2 F* ^+ y
@.Destination := assignLObj[1,row];" e8 A" H1 Y+ Z
end; 3 x' v" x2 O$ D% r+ `/ s0 o
newDirection(@);
/ D( R7 E% c7 o4 j @.HasOrder := true;" L- n0 q% F5 [0 o
end;
, U, m; ]( n0 b% L$ S/ n& Y) Y( {' K& N end;# X) g- ? q7 W- \
end; -- of the method% [5 E$ S" p# o5 ]3 K6 ?8 f4 k
|