/* called by: entrance ctrl of the object 'track'
' @% F1 E2 X( j& i*/
, E( S4 Y5 `* f8 K0 ~1 Y' his. z7 p. T* a+ C# `" O* D' ]& `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: E$ X4 J' F/ ~
do
( _) g/ ?0 ^* |" m Lan := rootfolder.Internal.Tools.AOLlanguage;5 h( Y. x. A6 v* n; {
if current = @.Destination -- else return
% F( H! Z1 b+ V then/ [1 p- v( _. Y0 j3 ~ n& q) p
@.Destination := void;
) @/ g, \& `8 ~' a3 K4 I if @.occupied then
4 j1 B+ ]9 Y) ^. y part := @.cont;0 [1 {; ?- _% X2 |) |% n% A
@.transpOrder := void;
, g* q* r/ h% E4 B7 i1 S: z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# F4 H. t' e7 m& b' h; s @,root.eventcontroller.simTime);
6 ~& x5 ~8 h8 G1 _! F+ ~ @.HasOrder := false;' B' F5 p# ` r( C: V( ~* S9 y
@.DrivingHome := true;- W" u4 d2 [( k( N% ~ R; s0 H
rgManager.tryToStartTransOrder;
% n( F2 s6 u" {, T; T+ _% h if @.Destination = void1 {# \7 H* G+ f
then -- no transport order for vehicle @
9 d# v' C8 J& S$ m. { @.Destination :=: V8 e& C* G4 ~; W6 p" Z, x
rgManager.nearestFreeStation(@,track.~);
# X) h$ h7 s6 @" `5 ]! x) K newDirection(@);
. `6 L2 y/ X0 y: H/ M if @.Destination /= void then
; [0 }$ y4 S! J3 G @.Destination.NumReservation :=
W3 G3 X' q! k9 A+ M0 t% w& f @.Destination.NumReservation + 1;# C* @; p; o- S* Q4 [
end;
" |" N9 b+ o" D$ v$ r6 b @.CurrIcon := "drivingHome";
. [4 a0 f# Y" A, P @.DrivingHome := true;% G( e+ j. T9 z$ [; k& H3 J
end;# d% {- R2 E4 ^/ x) i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. N( L. i- V0 h, W. Z L
part := @.transpOrder;
8 W! s1 B# \, Y) \5 F( S$ D4 ] part.move(@);-- load part! x3 [2 {4 L% A9 m, y6 |9 U
@.CurrIcon := "load";
0 W( r6 |, {8 \2 o0 Q$ { GlobalDistObj := part.globDestination;, B9 J2 J/ s6 e+ Z
assignLObj := rgmanager.rgAssignL;
: B0 s& E; X3 U8 V8 @- n row := assignLObj.getRowNo(GlobalDistObj);% \% z9 z% o; C9 \
if Row = -1 then -- since 709 L0 u& {8 e, Q
if lan=1 then
( |, O' K6 w: V H9 }/ h) r. h8 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ p. W& N H: u' w, k$ @4 f to_str("in der Andockstation: \"",?.~.name,"\""));% }6 Q( A. p- N) e
else
6 _; _, v" J P3 h# W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 I$ m H9 [8 M t4 Z, |
to_str("in docking station: \"",?.~.name,"\"")); , T( ~+ M- b, [- y6 a
end;) R$ [' @% Y4 F0 b+ d
else6 p# F$ b; e1 A* Z5 ]. M) _
@.Destination := assignLObj[1,row];1 U& {6 \: U) S5 O& [; m
end;
( D1 D5 P/ U, W newDirection(@);
6 S0 W1 W; ^# o @.HasOrder := true;
/ S( Y' z7 e6 |$ e3 z end;+ J0 _& s% c9 z9 W( h- f6 b9 g
end;
2 ~ v. O$ I' aend; -- of the method+ f" z$ A1 K0 c, M0 a- N+ T$ Y
|