/* called by: entrance ctrl of the object 'track'
6 m" Y# d E" n& v( w4 j$ i*/
1 V# \2 I9 D) Q& [0 I8 D. jis" M* B3 a. l. {) X8 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 N/ |; N$ T* s$ Y( |do
E) I) z" P6 n! }2 z Lan := rootfolder.Internal.Tools.AOLlanguage;
' Q1 ~( x+ D+ k3 x1 o if current = @.Destination -- else return$ Q: |; S2 z5 h# r2 B9 V4 I9 K
then8 f. h& s- J2 m/ P- ~8 X K- a
@.Destination := void; B# l( O/ E3 G2 S" ]! K0 u
if @.occupied then
, n5 C/ X& m% G9 o. D part := @.cont;
0 p$ A3 ]4 |+ z) s/ I @.transpOrder := void;
% M* [% F9 U B- S. z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) `7 L9 ~9 H% v7 G5 V% } @,root.eventcontroller.simTime);, q! ]8 Y- T t9 P0 ~
@.HasOrder := false;
2 `. ^0 U5 o# d @.DrivingHome := true;
* I$ c% ] H( |8 V: R2 @. }7 X rgManager.tryToStartTransOrder;" d6 {2 w. B" D) R1 F5 W" `
if @.Destination = void
2 T) ^* G, B$ u# V. ~' X B# [5 g. q then -- no transport order for vehicle @4 T: F2 ]1 J3 J4 {) C) r6 _7 R
@.Destination :=
2 ^9 F, G- z6 {/ o) x4 E/ j rgManager.nearestFreeStation(@,track.~);
* L) }/ p, A! p, k" f) _7 `% e+ r newDirection(@); / [' V6 `( [6 V# k
if @.Destination /= void then
6 t& p/ N/ |) ~/ k- W/ T @.Destination.NumReservation :=
# P* S" W1 r z; r9 \ @.Destination.NumReservation + 1;+ d9 S+ D$ R6 y0 u1 u! |8 g
end;% p' F! E) u" t' r; l( O+ F* i
@.CurrIcon := "drivingHome";0 V( W/ D2 p9 }. B- z6 D
@.DrivingHome := true;' M# A4 e- M1 C8 z/ O! w8 k
end;
) P( G0 K7 S1 o! J r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 L7 \9 [: _- ~ part := @.transpOrder;
, t9 Q1 N' E7 Y/ m part.move(@);-- load part
3 T& D0 T0 V& e+ {# U2 ^ @.CurrIcon := "load";
. h3 e/ e+ x- y5 Q j% f: Y GlobalDistObj := part.globDestination;5 d. i& Z; Z( C% w4 B
assignLObj := rgmanager.rgAssignL;) P" ~. e' ^9 B6 _
row := assignLObj.getRowNo(GlobalDistObj);
! ]: J7 Q: p# D: d if Row = -1 then -- since 70
" \& `; m% I2 F9 u if lan=1 then
/ Q% \6 D, l1 m# s8 v6 [& @5 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# n `( R1 _) s to_str("in der Andockstation: \"",?.~.name,"\""));
5 I$ v& ]' z$ i, R! @! B7 M else \; a& N' w5 D4 e6 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- \) B" T& I" V3 G+ ?
to_str("in docking station: \"",?.~.name,"\"")); - u, e5 ]# }0 }8 ^( y1 P
end;" } V& j, u' C: U' a8 ^
else3 K* }: @" }- y F4 n/ r( c
@.Destination := assignLObj[1,row];$ N# N: a8 C( O. u5 }! N/ l/ @' U
end;
2 e1 e9 |3 H- T+ P! } newDirection(@);
3 x2 \3 P0 S. b9 b. W @.HasOrder := true;
# ~: X* H3 F- b' b2 i end;
1 Q3 g6 `- I3 q6 Z) I) c; N end;" d6 N9 o: l* t5 u, j9 K) C9 C/ o
end; -- of the method' v; j& I1 ]" F. @7 X( W
|