/* called by: entrance ctrl of the object 'track'
$ O5 i$ _9 e4 ?*/
9 Y6 b8 }2 N- M$ P# K; o6 Y' bis
% L. _" ~$ A% T1 ~' h+ R0 W+ r& E% i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ N/ j& ?3 A5 \: Sdo
% P2 s6 {5 P5 R( @: _: y Lan := rootfolder.Internal.Tools.AOLlanguage;. J o0 \- }. {5 z. X4 z6 D1 p7 b
if current = @.Destination -- else return- H! }7 h% i# _/ ~
then
8 I: c" w2 W$ M D K4 D& b @.Destination := void;
& E T7 A2 g( A2 n, L" k2 ~: a! f if @.occupied then
6 u Z6 a! b3 k D; n" L part := @.cont;- A6 |1 r. X8 J# A
@.transpOrder := void;
2 }& Z9 }5 g0 D2 d% X! R! B3 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; E( N+ R4 x1 M$ o @,root.eventcontroller.simTime);
' U/ C% B+ V" }. v) P6 S3 S" c: a @.HasOrder := false;
7 q( r: [' Z) b6 Q! [ @.DrivingHome := true;
?; G, U0 W$ ]1 w \/ a/ g0 {3 Z% [ rgManager.tryToStartTransOrder;# j7 r' N4 |6 P: m2 p
if @.Destination = void' F" v0 y. n5 `& h- \
then -- no transport order for vehicle @
9 a- u9 k! C, V5 ]2 e. {9 d @.Destination :=) G n5 m) O% J4 ?8 N- M) Y
rgManager.nearestFreeStation(@,track.~);( Y) x# _8 ^1 s
newDirection(@); 5 `2 I7 f+ T' ^$ G; @
if @.Destination /= void then
3 `% @) o5 Z2 b( S6 u @.Destination.NumReservation :=
4 L' \; P- y5 O1 P @.Destination.NumReservation + 1;5 s1 J. B* k1 g0 x2 b d) S# L
end;
$ e- p/ U8 L. V @.CurrIcon := "drivingHome";5 O( b% I$ C& B; X6 V
@.DrivingHome := true;
* `$ e9 u; I" l5 e" ] end;
2 ?$ d; ^! P, h* t0 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r5 N6 k* n3 W! J part := @.transpOrder;1 z9 c, L* v7 d& C) G
part.move(@);-- load part) e. `* N. q; i* c$ R- W2 ]
@.CurrIcon := "load";
9 m1 r( {$ o3 `% i( Z1 b7 J/ y; } GlobalDistObj := part.globDestination;
, S( t. \$ F6 q: n assignLObj := rgmanager.rgAssignL;6 D' ] I2 g* F h0 N% h
row := assignLObj.getRowNo(GlobalDistObj);0 e) I, S! h, |9 E: H: q
if Row = -1 then -- since 70
) |7 a7 U* t0 s if lan=1 then
+ D9 v/ u$ v% x. T6 i, D7 L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. ?- n, x8 [7 k. g to_str("in der Andockstation: \"",?.~.name,"\""));
" s4 [* ` D: N1 @/ ` else
: X/ ?" r( @% I' y" {7 M1 B* o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 ^" _& S8 o ]- K0 u to_str("in docking station: \"",?.~.name,"\""));
6 r- ?! a# B: Z; N end;
1 }0 A( f* O3 P/ E* x/ }2 C1 l else
- _+ M2 u4 h$ V3 c- D3 {, @' A% w @.Destination := assignLObj[1,row];& j* |; I* \& A. A# @3 r+ b
end; * m: }0 K6 g. D
newDirection(@);, @4 n, P f1 a" W9 l4 @5 ~! H0 u
@.HasOrder := true;
7 x; \* {2 j% C4 P1 Q end;
$ R1 U+ c* }$ }5 g0 B5 C: C end;/ K0 L1 H! U( ]& I( z
end; -- of the method
4 i4 O2 L0 E+ m. e& `2 W/ W, ~ |