/* called by: entrance ctrl of the object 'track'
* p0 o0 \/ S5 F R& G- @*/4 e7 H2 K! ~* E& A, `, O
is
) P6 o6 |' F. |, R; \8 q V' k part, GlobalDistObj, assignLObj:object;row,Lan:integer;; X3 q/ P6 r3 V3 n
do
% v! ~; u: r( {+ { Lan := rootfolder.Internal.Tools.AOLlanguage;3 Y' M' |' h" o6 x$ \ M* Q
if current = @.Destination -- else return# Z; N8 I8 n' r* [
then8 i$ g ?9 X( L t1 Y! g e5 p/ r
@.Destination := void;
0 E/ _6 |! R ^* g# N" f% | if @.occupied then$ M: x) U7 }8 `8 t# B: E$ C
part := @.cont;
/ s% b& c+ ?. S( i( i" ~$ _ i4 s @.transpOrder := void;
' d- E2 @1 C% J& T5 h. ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; u( E/ r! Q9 n5 ~ @,root.eventcontroller.simTime);
) ]) t1 X) w8 v0 h6 r% K @.HasOrder := false;
4 i6 v' D0 A1 {. X& D# X2 @6 b7 }. N. m. V @.DrivingHome := true;
! G9 `# S8 h! H5 r rgManager.tryToStartTransOrder;
+ G, r+ a5 A; ~; ` if @.Destination = void( \ p% @- q7 L4 b
then -- no transport order for vehicle @' u ^+ ~- Q# z- H; M- u2 P) F
@.Destination :=
2 _5 W5 w6 m2 W$ W, t rgManager.nearestFreeStation(@,track.~);7 ^- A7 T8 y) O/ _. S
newDirection(@); 9 K: k$ r8 i v
if @.Destination /= void then
# ]6 [# E1 e3 h8 { @.Destination.NumReservation :=, U! b' o& G4 c/ |4 B
@.Destination.NumReservation + 1;* a; I# Z4 [" O3 W& |3 r7 _& S$ N1 z: m
end;
* E& E y8 s" F @.CurrIcon := "drivingHome";1 r6 l. C3 C' D! @5 D7 e& S1 Q
@.DrivingHome := true;
7 N8 g) |) }9 {/ I( {9 g end;
: a0 F( [% G0 O; @/ ~" ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 t/ W5 P) \6 L6 c# B part := @.transpOrder;
4 v6 Q' z b3 q( Y% } part.move(@);-- load part
" e) M+ g' k/ B. v: i @.CurrIcon := "load";; u$ z6 c5 C1 Y" M8 K
GlobalDistObj := part.globDestination;, p1 _% Q/ c2 ~1 H* o8 o9 ]
assignLObj := rgmanager.rgAssignL;
& S" B. J& \, [. B& V row := assignLObj.getRowNo(GlobalDistObj);" C( a5 `; t. l9 F7 x' j! k
if Row = -1 then -- since 70
; R# o% O. j$ l+ e, P if lan=1 then+ C M3 c0 K9 p5 a) L- T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 A2 ~! q% H a to_str("in der Andockstation: \"",?.~.name,"\""));% M3 }/ h4 | L5 w
else3 P1 e( P! @8 v/ Z! ?1 d! x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 g c1 _, A7 P# `9 ^$ b
to_str("in docking station: \"",?.~.name,"\""));
) K; p$ h+ ?( o# L end;
5 [& `+ a) d: W! I' @/ P0 A else
7 o4 M) T* _: F @.Destination := assignLObj[1,row];
# P a, Y: n, ?8 q- J- D, F+ k end; ' Y% t. i. v' R0 ~, @! `
newDirection(@);
8 B: g( K K- x; y5 x9 r' I q @.HasOrder := true;" r2 p6 E; b* Y4 m _
end;& R/ ?1 I" x# k, Z& l
end;0 n/ C, @& E" J+ N K ^
end; -- of the method
D. E# u( \; S5 p7 |2 e/ D |