/* called by: entrance ctrl of the object 'track'
! C) N" Y$ a5 N1 l$ l*/
9 r* k+ J* M# G+ l: b, _is
. t3 n2 S& b# Y3 K7 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;: \+ E, C- L2 r) d' {/ U T6 V
do7 M$ g1 o/ `8 T
Lan := rootfolder.Internal.Tools.AOLlanguage;5 ]1 V" v) C0 j
if current = @.Destination -- else return' a) N9 p% q, }9 D8 f8 x, m) R" ]
then1 n# D, y! ^8 v5 d8 k" |: }
@.Destination := void;
+ M! \2 g8 `1 [8 i! ? if @.occupied then! ]# L9 `1 V( X; u
part := @.cont;/ w Q* S3 s$ e) O; q
@.transpOrder := void;
" X1 N* D: j4 A. J. Z8 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( ?- K0 w' M0 e" c h @,root.eventcontroller.simTime);1 R; `0 N; I' G0 j; Q
@.HasOrder := false;
3 r9 X0 q- Z0 t) H2 u @.DrivingHome := true;
0 M# ]* t2 U0 @* l' W* P rgManager.tryToStartTransOrder;6 b- ?& F1 c; Z+ v# Y; y" y
if @.Destination = void
5 @6 `8 ?, I8 y9 x! a, j then -- no transport order for vehicle @
! Y v1 ~/ @* U9 ~. s2 T @.Destination :=
+ f* Q% X2 m: U8 P; _ rgManager.nearestFreeStation(@,track.~);
2 W& X. S- q- T# W& \, L newDirection(@);
# V& c0 h' G: n- k4 r if @.Destination /= void then
2 S* R+ W7 e6 i, x1 ` @.Destination.NumReservation :=9 P0 \& U# R8 s
@.Destination.NumReservation + 1;
7 t ?0 v+ u9 i end;3 n a! {. [3 n4 H: [& }+ K: f$ |! E
@.CurrIcon := "drivingHome";
. N, u6 O- ^1 M: V* c @.DrivingHome := true;4 K$ J$ k* P5 M) P2 k: r
end;/ N0 U$ B5 O1 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 t& }& G! g3 Q6 T1 c part := @.transpOrder;! V, m8 e" n) @4 C) x. }
part.move(@);-- load part
# N- a; U ]$ Q7 x @.CurrIcon := "load";; B# Q3 a' [4 l" `8 S+ p x, V, \7 d5 }
GlobalDistObj := part.globDestination;
! i- o# l) R6 a assignLObj := rgmanager.rgAssignL;
5 |+ u" K6 s ?( r! m7 g row := assignLObj.getRowNo(GlobalDistObj);
$ I' t$ O9 O7 F4 e4 | if Row = -1 then -- since 70
$ T# Z5 L7 _; n2 J$ G9 ] if lan=1 then2 c* d$ L U/ j4 `! N$ F) |$ G. Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 D& L3 k) Y: L. E w7 b to_str("in der Andockstation: \"",?.~.name,"\""));
7 F, ^- Q! b( ]! L9 _ else) p; X; K9 u4 ~# G% M- v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 B, ]/ [. b- R* a
to_str("in docking station: \"",?.~.name,"\"")); - F) L# z8 t" A" T1 }
end;6 }4 E, Q7 Y/ U( g! ~
else
& ^: `0 u7 E0 @( d$ l @.Destination := assignLObj[1,row];: O ^" a: m+ Y$ @7 ~/ G+ A
end; 8 d3 t" |1 v1 T3 H1 U
newDirection(@);5 `9 F+ T: R8 P* |1 x' U3 s5 A
@.HasOrder := true;
& F# ~! L# s6 c: j7 m$ c# _ end;
! @8 K7 d) W4 g4 G* r8 ~9 f5 B end;
( S9 R. {3 I/ O9 I% R9 M/ v/ eend; -- of the method
, G V" [# z7 q% f2 k |