/* called by: entrance ctrl of the object 'track'
7 ]1 ]8 ?' {) Q+ S, D, e8 \*/
/ m- W& ^4 a \- Nis( f' P8 a, [. l7 z8 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 y- o% { z I
do
" w3 s7 H+ G+ r6 Y$ Y) ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
! {4 u3 u0 n# _8 D5 I% Y if current = @.Destination -- else return
7 w3 b2 Y0 G+ o1 v" _" q7 |$ B then
3 h: p$ V/ M5 k @.Destination := void;; R0 B3 G6 H) u8 {
if @.occupied then
! q7 O7 V; P" y) v5 |$ m! F part := @.cont;( I* L. E" X8 z3 ?7 D% u
@.transpOrder := void;( z. `# T% h% Z0 i6 ~6 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ V* l* N# d5 k1 B" X. X( X @,root.eventcontroller.simTime);& t4 B: j9 Y! k3 f" i$ L9 p7 ?
@.HasOrder := false;
& c: ?5 B2 y0 Y( p @.DrivingHome := true;
+ e9 l( p2 f. _: d) X& f rgManager.tryToStartTransOrder;* m! O/ k) e, Y9 g
if @.Destination = void" z( K# ]9 [. I6 R0 `& A
then -- no transport order for vehicle @
; O' b7 a+ z! _1 M" c @.Destination :=5 F! G5 u1 w9 [( o5 G4 l/ V: O
rgManager.nearestFreeStation(@,track.~);4 F/ u' v/ {6 Q- P: L
newDirection(@);
( o) q9 v$ {7 n' d0 s4 p if @.Destination /= void then
- o' O, Z/ L ]" L2 d% l0 n @.Destination.NumReservation :=
* \& A8 Q1 \8 m1 W& ?$ ]. h! r6 j6 f @.Destination.NumReservation + 1;
2 x! R/ _' I( Z7 b end;* }# q# \' |. Q
@.CurrIcon := "drivingHome";
# h! t/ V7 x6 t @.DrivingHome := true;
1 n/ K7 Z% _4 p: x end;% I( C! ?5 y8 n0 i. @5 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, E; j/ f; v3 ^ part := @.transpOrder;
- T. q; |3 Y7 K- M part.move(@);-- load part
4 p w d+ p0 ] @.CurrIcon := "load";. n& d+ j7 b1 X2 y$ ?6 J
GlobalDistObj := part.globDestination;
/ q o- r/ @& ~- _8 x5 x assignLObj := rgmanager.rgAssignL;+ d5 c1 F/ G7 r5 a s5 l) H, g
row := assignLObj.getRowNo(GlobalDistObj);
" y g* u) o1 w9 h+ y$ _ if Row = -1 then -- since 70# V" Z f: c, s
if lan=1 then
" I3 Y" \; \. j( n$ s* J8 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% j1 H; Q& V, @2 r to_str("in der Andockstation: \"",?.~.name,"\""));# S- L% b9 M" I/ t% t Y$ _2 C
else
: Z, Y7 S( T. G1 {; w4 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& P* ^+ K _8 Y6 g" m
to_str("in docking station: \"",?.~.name,"\"")); ) F' d/ Y$ e3 }9 S0 d( D$ @1 u- l. x
end;
* ?9 i1 J" |4 G0 p else- C; [2 H5 X( j# A5 M
@.Destination := assignLObj[1,row];8 A& X; _* N0 d4 H% r' i6 t
end;
- H5 z7 Z$ E) Y7 _& d8 |& U newDirection(@);6 @9 l/ C0 M4 f T1 F
@.HasOrder := true;4 {: O/ A& t4 R
end;1 t& n* j8 n1 h6 n
end;7 Z: q# T1 T2 J" I! V2 e/ m+ i
end; -- of the method% y: d5 ]" D/ c# S( N+ [( [7 n+ B; K
|