/* called by: entrance ctrl of the object 'track'; H* S. |( r& h0 x
*/
2 a" i* o5 c6 h! x- r4 m2 Tis
2 y$ x+ e( w% o3 S8 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ @3 @9 |: R/ a, N% Ydo* O6 q( G! u: @
Lan := rootfolder.Internal.Tools.AOLlanguage;) [% n& ?. Y ?$ d7 w8 a
if current = @.Destination -- else return
5 P( z0 g# K" H1 O then
( }3 p( u/ T+ W4 q2 o3 u: o @.Destination := void;4 d) N. z( a' x, z% p
if @.occupied then
# a6 p2 b m4 b! Y3 c% r part := @.cont;& ^% } P- d4 p; U& f
@.transpOrder := void;+ p+ s" |& e: _* S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: c9 ]6 `2 D0 T; P% }/ }+ G2 s @,root.eventcontroller.simTime);8 M' |$ \0 ^. u1 k# p! B4 t
@.HasOrder := false;# G/ b e R- d. I9 O3 }( `& L) f7 \
@.DrivingHome := true;
$ k' \7 L4 `$ V) O: V rgManager.tryToStartTransOrder;/ B# J3 i, {: J1 H; I/ Q
if @.Destination = void
* s6 |$ V( X1 [ R$ K then -- no transport order for vehicle @" o0 r, A' f8 J8 Y5 D
@.Destination :=
% ~1 P. V& `/ S rgManager.nearestFreeStation(@,track.~);% k6 O3 R* i# v$ [
newDirection(@); - J1 k4 Z& T% J( p8 K1 `
if @.Destination /= void then7 s$ q/ J# J( j4 _; _3 J2 R
@.Destination.NumReservation := V5 r$ C0 Q: K7 J
@.Destination.NumReservation + 1;
. A1 f" R, Y7 ~ end;
0 _, r8 E! ^; X/ j; T4 W @.CurrIcon := "drivingHome";. s( P! \0 U0 w1 l: K
@.DrivingHome := true;
9 b$ ?2 n1 D0 g end;
5 G: d/ N& W; G- T% [/ J1 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ H0 [4 D( j- _2 L1 Z6 f& V1 Q2 X
part := @.transpOrder;2 \6 A9 V5 \0 h
part.move(@);-- load part% U6 I3 u/ |. |! H: z
@.CurrIcon := "load";
0 ^+ j. X' l( ~1 U0 A$ a GlobalDistObj := part.globDestination;
5 H' B% {8 E, t assignLObj := rgmanager.rgAssignL;
; O% \* x9 d3 o; T. e9 C) m row := assignLObj.getRowNo(GlobalDistObj);$ g+ I- x7 g8 c
if Row = -1 then -- since 70; T9 U8 c0 L' W! d7 P4 ]/ g
if lan=1 then
) |/ t( \1 |/ W1 [6 f' ` s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" s/ K$ Y0 {6 F( Y4 Z) f$ P1 m to_str("in der Andockstation: \"",?.~.name,"\""));
) o7 v* p% y5 A2 j else2 J& v" S. h7 T. t; O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 S7 L4 L7 P; Z$ g to_str("in docking station: \"",?.~.name,"\""));
' i2 L/ s$ ?5 w* I% N! u end;; V: \$ A* n: F0 {- C, o
else
/ h* m/ K/ x5 i. p$ ~9 p9 a4 L @.Destination := assignLObj[1,row];1 H$ P) H+ G- }/ [. A$ g6 G
end; 6 X0 Q' D$ V1 @. J
newDirection(@);
+ c; b% A# N$ |( q @.HasOrder := true;2 ~, X5 O8 J# S& w
end;" m; [2 ~5 s) o8 Q: e) b! S) O
end;
( Z8 }8 C$ t! p9 \6 jend; -- of the method& j6 U$ q. X" q$ v0 S" r
|