/* called by: entrance ctrl of the object 'track'8 }3 x G9 K) a2 J w
*/8 z; g0 I) r- A; A7 J" ~
is
$ P$ C m G& f; M: h$ N: {7 r& S: [) ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;; q8 _2 }6 z3 S8 K, B
do/ n( \3 t* Q9 l6 p) ]2 p' M. U; |
Lan := rootfolder.Internal.Tools.AOLlanguage;( v7 \/ g8 b8 C% j
if current = @.Destination -- else return
3 |6 e/ s9 ? l P- Y then
8 }+ c$ J7 {+ v- ^ @.Destination := void;" B8 a+ }6 t8 m8 ?
if @.occupied then9 ~. k! f+ k! K7 j6 I, @* e
part := @.cont;
. l; d3 t5 W* G9 k& W @.transpOrder := void;
) \+ n# t, H2 ]. \: e& ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% f4 c0 j. W& A, z @,root.eventcontroller.simTime);. l( k) [$ r9 `
@.HasOrder := false;
0 ~. J6 B8 c! C# q# `/ L @.DrivingHome := true;1 o# _- D2 Y+ y( [: t
rgManager.tryToStartTransOrder;
' w8 b/ y7 z7 h# P8 p/ d if @.Destination = void
0 e, ]; H# r% B' P8 f# O then -- no transport order for vehicle @) w( b! y" e* b( Q; B( f$ |
@.Destination :=
8 o0 g0 I9 b" J1 j* Z8 ~ rgManager.nearestFreeStation(@,track.~);/ X0 @. C% o/ T$ e
newDirection(@);
1 J9 b6 K$ r0 P& K& `# D if @.Destination /= void then
# O- S9 F6 x k8 ? @.Destination.NumReservation :=
7 I9 v4 T/ u; ~: g @.Destination.NumReservation + 1;1 a* c1 M t" m, ~
end;3 }( y! }" B8 r9 a
@.CurrIcon := "drivingHome";
) j8 Q9 @7 S6 l0 \4 p @.DrivingHome := true;
- y$ q. f9 q, S6 k- y) D: u, K' u end;
7 M/ Z% P0 w% i7 n' B6 y' F& A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( y+ H x% |! N9 K2 s. y8 y part := @.transpOrder;
, o w- i0 |; ~9 L: H part.move(@);-- load part
0 P( A! z4 w" l) b5 g% t @.CurrIcon := "load";. c6 y* C4 o. ~& Y9 `' ?/ D3 T. i
GlobalDistObj := part.globDestination;5 ~( {0 q' R c0 i
assignLObj := rgmanager.rgAssignL;; A E3 T' y h; r; Y* H
row := assignLObj.getRowNo(GlobalDistObj);
4 B) l6 _/ Z$ j4 P# E8 l J, ? if Row = -1 then -- since 70$ N6 r0 z9 M! d& h
if lan=1 then
/ S! d# u) |% p4 \ P. S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( E7 t4 [$ x' p to_str("in der Andockstation: \"",?.~.name,"\""));
% B3 o& k' L, l5 a9 y! Y2 J else* p- E1 w# \0 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! q( {" M# O2 L6 a& C
to_str("in docking station: \"",?.~.name,"\"")); . }1 P6 J# ]* ]% E5 g( ]
end;
5 g6 H; U8 X4 u5 @( }* O) ^1 g, b else/ A& @# J( x0 ~1 P1 V! f, ^1 s: n
@.Destination := assignLObj[1,row];# r2 J5 w7 i' N* H @
end; 0 e Z7 X% \" \# ~% s& u
newDirection(@);: P5 v7 J/ i j. i; M1 Y1 f
@.HasOrder := true;
0 R! U$ r/ d9 n3 U2 {3 ]1 f+ ? end;
( a1 d: i7 B9 [8 y end;2 k" T5 J2 J. P8 p# v8 z
end; -- of the method
4 W G1 L+ x {! a. o* x |