/* called by: entrance ctrl of the object 'track'
8 m. F1 P% c2 [*/* Y' {" A( y" \. y
is% H8 R6 F% X$ e- I" m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 z1 x# D& r5 d4 e, b: B+ O; ndo
5 Q( Z% ^: ]. b8 _ Lan := rootfolder.Internal.Tools.AOLlanguage;, p8 Q; F! Z+ ?( v" F2 v' D
if current = @.Destination -- else return
) W; q1 ?2 W* `- ]/ N: {0 t then) v s* M3 J( K/ z4 S. s
@.Destination := void;
5 T: A/ b3 ~& O6 d/ ? if @.occupied then! L; ^% U7 v0 F6 j: J& Z7 g
part := @.cont;
0 H2 x; D, T9 q- I& H @.transpOrder := void;4 H1 n5 d, m% @1 v+ s; x' N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 o; ^, i' w' }; V
@,root.eventcontroller.simTime);' e* P& C! s; K6 p8 h$ l
@.HasOrder := false;; j1 ]9 s5 P8 C
@.DrivingHome := true;, Y2 B/ m1 m' Z4 w0 s
rgManager.tryToStartTransOrder;
% ]1 \3 Q) @! d) \ if @.Destination = void
1 p6 q9 q$ A( C! ~9 J then -- no transport order for vehicle @! o( y P$ v T; Y. _+ ~
@.Destination :=
( x) S6 Y( \+ w7 U" ` rgManager.nearestFreeStation(@,track.~);
q/ c/ n8 R& _4 [% I6 G3 i newDirection(@); Z4 d/ w. T1 x, Y1 w. b; `
if @.Destination /= void then
+ l: J1 i! B6 B+ ? @.Destination.NumReservation :=
! T Y5 z% T" Q @.Destination.NumReservation + 1;
' k9 C6 M+ d( `4 z1 O end;
1 v; `( X/ S0 c$ z7 Q* a( R @.CurrIcon := "drivingHome";
# ~8 q- q, f9 P! Z# q: ?; P+ c @.DrivingHome := true;
' w) ^' t+ ]1 _7 f end;' p p9 \, K# H' ]+ O( {& W0 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ V" i8 h0 ?, I* `( P
part := @.transpOrder;
! U0 g6 [$ m* C+ B+ Q part.move(@);-- load part) P' M: Z3 f; x4 X
@.CurrIcon := "load";
+ N5 s, U) D5 ~8 N* M3 j) K GlobalDistObj := part.globDestination;
0 S' x5 H/ t D- W+ {2 e. ~1 f' u assignLObj := rgmanager.rgAssignL;+ U+ P; J1 Q5 e* z. _- W
row := assignLObj.getRowNo(GlobalDistObj);
2 n! P5 u- u4 ` if Row = -1 then -- since 70! [5 P3 p) i7 _7 p+ a1 I/ U' d
if lan=1 then: g) U9 [0 [6 K; Y. W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 b r0 G6 G/ G8 f' h" \1 E to_str("in der Andockstation: \"",?.~.name,"\"")); r1 F5 S9 d; l" Z' \" _$ v5 `& |
else' v8 {% k# h; `3 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. E, u( K) Q5 g- n; q+ X* w ~
to_str("in docking station: \"",?.~.name,"\""));
5 b/ j$ i2 S& U" S* g* `2 ] end;
% Y: }3 E: }1 i. E1 q. X+ l else6 B. O; y: G5 F6 e
@.Destination := assignLObj[1,row];
" |8 X8 f( q @. | end;
" z8 c1 y1 d% V, K4 | newDirection(@);
7 y( V6 H4 \ g* m @.HasOrder := true;
0 K, {6 K- r% Y end;
5 @- b; L8 o* a* V7 R: a end;/ S) j% ^! J3 ^1 I2 a5 x7 a
end; -- of the method
5 n" F% F1 G/ F* l d4 [ |