/* called by: entrance ctrl of the object 'track'4 o& R# n; o' q, b' Y; ^0 Y
*/
, f" a; a% G" o7 n3 }8 {is
+ G+ f" V9 r* F! B; R part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 i8 B3 Y- w' J( f) J
do6 [8 w/ m4 H: R7 F
Lan := rootfolder.Internal.Tools.AOLlanguage;, L- E% X& R/ x
if current = @.Destination -- else return( X( H& x/ i0 \1 a
then6 Y: a5 @6 [- U4 ~% P
@.Destination := void;2 `( l2 u! b" I
if @.occupied then
3 Q0 M6 E1 r, {: N' `* B- [ part := @.cont;
! P& v, |' q2 n. Q0 @+ f @.transpOrder := void;
) {8 E7 c" _; ^5 E) x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 e( i5 V' \- P, C- X+ H" Z$ Z
@,root.eventcontroller.simTime);6 Q% V' J0 p7 h/ r% K; r' z
@.HasOrder := false;: Z( X! D, X( n9 _6 p6 m; v
@.DrivingHome := true;
' s6 Y& G, K( f! H# B' W8 L rgManager.tryToStartTransOrder;
& ^" l& o7 m) f$ @3 Y5 [/ L if @.Destination = void0 c! b, ^6 ~2 E1 a+ N) f' b% a- @
then -- no transport order for vehicle @
- ?) J3 r: K; p$ w9 ~5 c8 D$ A @.Destination :=7 }' ^2 o3 b3 Z+ I7 F: w. f
rgManager.nearestFreeStation(@,track.~);
- }# w: L5 Y, D/ g' P9 d2 Y newDirection(@);
1 a6 a2 n; |$ ?' Z7 g if @.Destination /= void then
/ h3 B: s( e+ a0 q' x- b' D' K2 w @.Destination.NumReservation :=- k& j5 U6 q$ {7 i" c, @) E5 m
@.Destination.NumReservation + 1;
1 R1 p# o& K- n* L5 a end;
4 I$ f9 N, W! W @.CurrIcon := "drivingHome";
0 v6 H2 Z1 n# H, A8 m @.DrivingHome := true;
0 h1 b& B4 k* U: _: U. N# \ end;( m1 P3 G3 e% ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; N7 @! |" Q: G1 @" A! f
part := @.transpOrder;
% H: x& g1 k' L g1 U part.move(@);-- load part
) i/ a: Z/ J' { @.CurrIcon := "load";
7 t- J, |, R: [0 A5 c5 Z9 t7 {: e GlobalDistObj := part.globDestination;9 g) H3 r1 p6 p S9 z" H& i, ~
assignLObj := rgmanager.rgAssignL;
0 Z9 ^5 H2 V. f- k: I. x5 W5 U row := assignLObj.getRowNo(GlobalDistObj);
; h( h2 n0 ?. ^* X, E U; v if Row = -1 then -- since 70; y5 g/ ?6 I8 w8 A) I4 B
if lan=1 then
9 ^: y; ~# b" O( P# F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ~" G! u6 J6 h3 a7 p/ z1 F" ?) h to_str("in der Andockstation: \"",?.~.name,"\""));
+ @+ l N" e, a. U9 R; j1 A# S5 ^ else. F9 l* J3 ^# Z4 T2 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* C9 j+ j+ E; c# A- l
to_str("in docking station: \"",?.~.name,"\"")); # H% k/ e$ ? Q& N! E
end;# ~' o* v$ J; v6 y+ _+ P! s
else
: [: g- |, u) q1 E @.Destination := assignLObj[1,row];, I3 A' d% U7 i/ D) ~ Y/ L
end;
4 R! Z" G. |; ^9 P" b newDirection(@);
+ O( K; Q. h1 H8 p$ D* Z @.HasOrder := true;8 ^% |/ o' _' s
end;4 T/ N* m) K! ]
end;
) {. p; ]: R! n0 b2 @6 Q3 t" N2 Qend; -- of the method
7 B* [$ Z. J1 j# N1 E$ p |