/* called by: entrance ctrl of the object 'track'
1 X2 B; Z: }1 d _1 K: x v) b- L*/
$ [ D9 X" n& G6 His
' h' R4 a1 n3 ?: v6 K3 T$ o/ N part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 H" T3 L5 b1 ?5 o
do1 f) S1 h) G/ p) R
Lan := rootfolder.Internal.Tools.AOLlanguage;+ i# z& j$ m8 L( R8 G# n1 q$ U
if current = @.Destination -- else return
7 [3 H6 B$ e) i( @$ Z. Q then
" [" t7 S& u" K @.Destination := void;
/ [( j/ M2 A7 E3 B, g- A' g if @.occupied then; x, ~: D5 G, |4 l% \) y [
part := @.cont;7 L, d o5 \* a) k+ K. d5 S& [- I1 ]
@.transpOrder := void;; G& t! D" _8 S+ d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ O: I m9 i' e. e @,root.eventcontroller.simTime);
& H2 F/ Y/ T* i7 J @.HasOrder := false;
# ]5 W% |0 g9 O# R @.DrivingHome := true;
7 N# x1 x& j1 s rgManager.tryToStartTransOrder;
; U$ F4 p" a: ?: ^1 g, [ h if @.Destination = void/ s* d, m; L- N7 y8 C) F) D/ w' @. c
then -- no transport order for vehicle @" ]0 }! K8 q8 E, h) c7 Z
@.Destination :=
& A4 f3 z" G, G1 P5 C# f rgManager.nearestFreeStation(@,track.~);% B; O& e/ Q7 x) x" Q2 `: A
newDirection(@);
1 Z$ A& [: X( D. h, c" c if @.Destination /= void then
3 o0 e, E# z1 @/ e2 O ` @.Destination.NumReservation :=7 X, c$ M& V( z" Y
@.Destination.NumReservation + 1;* Q& l+ O' u- w i6 ~
end;
, _4 T( o! Q* Z1 @+ I @.CurrIcon := "drivingHome";& b( [; K2 B+ x( L5 b2 X
@.DrivingHome := true;
# D2 Q: d) C- C& y# r8 i end;
. K- X7 C7 [7 G1 `# k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
z9 f# u" T( a part := @.transpOrder;
3 n# Q" j: \9 K) t! @+ M3 F# d part.move(@);-- load part7 s7 b4 [3 c- m/ b" G6 h$ p7 f
@.CurrIcon := "load";
; A6 y" ^. f0 M: d; g GlobalDistObj := part.globDestination;
" Z1 O, q1 K8 w5 {/ P/ T- y% ? assignLObj := rgmanager.rgAssignL;
' ^3 d! j8 [0 K) e3 C" Y7 E1 j( E5 H row := assignLObj.getRowNo(GlobalDistObj);1 g; N- U, ?, s- X3 I
if Row = -1 then -- since 70, B/ ?! \/ `( J1 e3 q6 d: u
if lan=1 then3 o* E7 t3 _5 `9 [4 ]1 Q7 a3 F/ C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ H7 t$ T; ?+ D- Q. W9 _ to_str("in der Andockstation: \"",?.~.name,"\""));
: u& E1 V7 g7 f& L' }% q y else
9 b$ T2 k9 \4 W" T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# w% U8 e; N9 _) Q8 |) K3 i( \ to_str("in docking station: \"",?.~.name,"\"")); . L1 d" z2 X% c1 n" N+ L
end; Z( Y+ E! l0 t/ j
else6 P8 K/ L2 r1 Y; [! `
@.Destination := assignLObj[1,row];
& ?* y% V3 p% P& f end; ; V- d q& B9 u% N
newDirection(@);5 q$ [6 I9 Z& L$ {9 i
@.HasOrder := true;
# _& R# M2 v9 x% b7 v5 E5 Y end;/ B: }4 R. |" @: W
end;8 V2 X; N4 M$ C: o" c, ?8 h. n& G
end; -- of the method
" Z4 M$ D+ N" l9 U3 z+ z% R |