/* called by: entrance ctrl of the object 'track'1 O" R/ m/ N. {0 d# o5 @
*/
8 \6 I& w# p% y6 a; gis
% k5 X8 w. |+ Z; J1 u, s1 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ L( c" V* `' K* {do( m4 `0 z* z- |3 K. F) g9 v0 U
Lan := rootfolder.Internal.Tools.AOLlanguage;6 U6 P7 O' q; f; e3 G
if current = @.Destination -- else return
) T$ M! [( W q9 ^8 F then9 B; S1 w4 E- E1 q, |
@.Destination := void;# \- I# Y. d5 I+ p u* F
if @.occupied then
% \( m/ t: N) G( _3 }2 H3 ? part := @.cont;* d( v! l- Z _
@.transpOrder := void;
3 r" j" R( Z6 L* A) k" b s( ^7 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B2 ~* p, ^5 D1 ~" `
@,root.eventcontroller.simTime);1 C0 |5 \# D$ r- R' s$ `0 P
@.HasOrder := false;7 u* V9 J/ j2 i% v; U
@.DrivingHome := true;
6 M. t8 j+ B/ N, |3 a5 C rgManager.tryToStartTransOrder;8 z4 R0 Z* Q0 P$ {2 h6 c" w' }
if @.Destination = void6 I8 h- Z; j! D1 h5 i
then -- no transport order for vehicle @7 |5 c( @+ ^& d, M$ O6 x( Q
@.Destination :=
) {3 r. \: V J- M rgManager.nearestFreeStation(@,track.~);* w9 @: _3 C6 b- g$ `1 f# R. y
newDirection(@); & G% R. @$ R+ K
if @.Destination /= void then
+ R7 X' O0 t% r ~ @.Destination.NumReservation :=. s' G$ }8 J: e% L8 n
@.Destination.NumReservation + 1;' C, H4 r0 ~6 S4 h
end;
$ i7 t% L+ d3 ~) x! a$ N @.CurrIcon := "drivingHome";
; N4 }3 v+ J1 n$ m' W" T @.DrivingHome := true;
7 s. G+ O4 |# w2 L$ `$ G: L6 \ end;
0 {- N$ i* D1 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station; E+ x* T1 ^2 E- d& \
part := @.transpOrder;
/ Z# b6 T, J7 L$ I part.move(@);-- load part
+ H& D5 p- W4 `0 n @.CurrIcon := "load";
c3 {" h% o7 H, t) m GlobalDistObj := part.globDestination;
; \ S/ K8 k1 m- k( j assignLObj := rgmanager.rgAssignL;0 b. |' c5 b! U; q3 @8 U- C
row := assignLObj.getRowNo(GlobalDistObj);
3 l. V8 ?. b1 o Z) o6 o G6 Y) O if Row = -1 then -- since 70
. }5 C8 S! U9 f0 l7 d, G5 V( F if lan=1 then
/ V Y/ x: S E1 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 Y3 p3 l4 u' N0 f' z& T to_str("in der Andockstation: \"",?.~.name,"\"")); [/ h7 ^9 z0 H% Z! s, ~
else# {3 w' @, k# \" y. J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," w& ]% _& ~' I
to_str("in docking station: \"",?.~.name,"\"")); - B3 X' Q+ E; @+ c, v$ w( M
end;
6 e- f9 W# Z. N h' d else
% _$ D# L8 ]0 `" b. e @.Destination := assignLObj[1,row];
0 G# }5 N7 R6 f" P, x) }# } end; * H% ?; ?( @9 I, b: b
newDirection(@);3 J% s0 V; u# e0 t, z
@.HasOrder := true;. ~% q% E% M/ [
end;9 O+ U3 j" u3 l4 o1 w
end;" V; D2 s8 ?* n9 Y. N
end; -- of the method
9 _+ c( y; S+ P' d |