/* called by: entrance ctrl of the object 'track'$ Z- k& U- Y1 }# U0 t9 b3 J
*// { C$ }2 U3 }% Z- u
is
0 s1 A" F: M9 Z# X6 ~* {. z part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ D0 F$ q' j6 N
do4 S8 r5 w+ B2 r* W5 t
Lan := rootfolder.Internal.Tools.AOLlanguage;1 k4 ~/ Z! N* P1 M c/ C' P4 m( {
if current = @.Destination -- else return
1 y$ B; @/ f' y3 G then8 I+ X$ b9 i" F; z8 {+ i1 }
@.Destination := void;4 ^( [; L" D6 `4 M w1 J i, ^! I
if @.occupied then1 y/ u6 } `3 y0 e1 t3 x
part := @.cont;
: g7 B6 b7 s, e* P2 R% c6 E/ B' X @.transpOrder := void;5 ~/ q* h' y B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 _1 i) Y5 M# P0 o! | @,root.eventcontroller.simTime);+ f" H& `: K V1 W+ I4 Q9 n+ y# D
@.HasOrder := false;9 ]1 H- A: `( T2 L, T8 u" F3 y5 D
@.DrivingHome := true;
- \" e: h! K E/ \& t- q rgManager.tryToStartTransOrder; [% U/ z* v1 P- L% O( N
if @.Destination = void
, H& i$ p" Z4 v# X' a# \ then -- no transport order for vehicle @
7 F. K3 n' @4 R, K. q$ r& H @.Destination :=) {6 M& N2 w+ G1 a& c% a
rgManager.nearestFreeStation(@,track.~);3 B1 Z" W2 J, O% j2 U
newDirection(@);
9 J+ y2 ?4 N# Z% h7 c if @.Destination /= void then. |9 a5 p! B O Q- k& |& L
@.Destination.NumReservation :=* A6 @) H8 {( j% Y
@.Destination.NumReservation + 1;- D ^ s) o6 r5 J' K
end;) I* X4 i" P8 H+ O' V
@.CurrIcon := "drivingHome";
) }3 e5 A* z5 @/ P# P' @. U, ^. ~: Z: | @.DrivingHome := true;2 q" v7 G3 Q! C2 R8 ?, u3 W3 [
end;% t/ {; c, W) |) F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: C6 a. x; T1 k; X% N( h# s) F part := @.transpOrder;( ~6 c% ]' F! j7 q1 { J! N4 B
part.move(@);-- load part
9 c- h4 A" W2 k+ N- E5 D8 v @.CurrIcon := "load";$ ]8 H- o4 F, m0 C- b% w, p% ~
GlobalDistObj := part.globDestination;" M# T7 \8 ?- ^' O4 ~* N0 x
assignLObj := rgmanager.rgAssignL;
5 |( e. B0 I& B- c" ? row := assignLObj.getRowNo(GlobalDistObj);
9 Q! [5 o6 [* V if Row = -1 then -- since 706 C3 U9 Z& ~6 d
if lan=1 then
& m& u9 E& A+ c3 v1 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; q8 @' u* {, C: A to_str("in der Andockstation: \"",?.~.name,"\""));1 K# Z# P) B/ ~. n/ b/ G9 x
else- R- r8 ^* V3 \! j4 v- w& O. h# z0 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 k( A: o( S& c9 C+ A2 @ to_str("in docking station: \"",?.~.name,"\""));
( v. ]( ]7 S) d3 m end;$ @! ~) K! X% N1 ^/ y3 _ L0 |
else+ W5 p0 M1 s* w# H% G
@.Destination := assignLObj[1,row];0 ]0 G- t' n2 \* ?) |; P( f
end; 0 k$ A* M5 C0 P4 T& s& d
newDirection(@);
j+ R6 ?( a6 x @.HasOrder := true;2 V. l7 G1 S. c( o% E: G
end;9 B* a9 ?* g. }% y& b2 A5 F9 I
end;
2 s x. _6 q- s. t: p3 vend; -- of the method. G0 v+ _& y# d
|