/* called by: entrance ctrl of the object 'track'
$ g: o F5 k$ t! d' N7 o*// k7 |3 E4 h( e
is
8 z1 J2 W1 b h9 V# n, M/ z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V/ F6 A+ J& r5 G, Kdo
# u0 K, b& a2 K* m1 i9 i: Y Lan := rootfolder.Internal.Tools.AOLlanguage;
d' u* b" y7 j4 J+ L if current = @.Destination -- else return
1 {& |. @$ O; N d then& v' ?; `3 y5 c9 l
@.Destination := void;. ], `/ m: d' r
if @.occupied then6 u& V1 @6 X8 `6 n! P/ i1 L
part := @.cont;
: S6 _6 v0 Z- U9 c: Z1 s' X+ P( { @.transpOrder := void;
1 D. v2 u$ h# d' l2 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Z) j9 J! D' H
@,root.eventcontroller.simTime);
( `6 e' d. z% _7 x# T$ \ @.HasOrder := false;
, M2 d u1 V! [- W6 p. z5 U9 V @.DrivingHome := true;; a ?1 q+ z: I: O
rgManager.tryToStartTransOrder;- G0 @0 H! o: R X* [% c
if @.Destination = void7 j8 d3 Y% Y% ~6 G+ }
then -- no transport order for vehicle @
# V# g4 m; Y: c2 x# B- u9 l @.Destination :=
; H2 b3 c+ M* |7 f! a( ]# \7 w rgManager.nearestFreeStation(@,track.~);
. z! g$ Y5 u# [ newDirection(@); % h4 g9 |5 r( c* ~( y [ ^
if @.Destination /= void then
% i" q; u6 W6 M0 s @.Destination.NumReservation :=! f0 Z. d' r4 i% l
@.Destination.NumReservation + 1;6 v6 c/ m7 L) ? @0 A/ m2 F- h
end;
* V$ _% ~- @/ i @.CurrIcon := "drivingHome";6 H* |8 ^7 q/ n; f' {4 ^
@.DrivingHome := true;
' @ W; Y4 W5 `! ~/ [! c0 Z1 \ end;
7 _6 s6 @5 A- ]& n else -- the vehicle @ is empty, both vehicle and part are in the same dock station s0 v$ I1 Z) W5 {
part := @.transpOrder;
" R' r$ F; J7 |( M2 g. s2 ` part.move(@);-- load part1 w, D$ X+ y- K6 ?; P0 B7 D
@.CurrIcon := "load";
7 q$ A- I* ^) H' b; i9 W0 h GlobalDistObj := part.globDestination;
* p; `9 H4 X8 j: w. I assignLObj := rgmanager.rgAssignL;" c9 v |/ j2 p# W" c
row := assignLObj.getRowNo(GlobalDistObj);/ D$ Z2 y/ p7 E& W! a- \
if Row = -1 then -- since 70
: Q, j5 F! @8 s3 c# |5 ~" {7 G if lan=1 then
6 K1 Y$ s+ [* Q: }; j% W' ~0 Z$ D. G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," V } h. g1 m. W1 H
to_str("in der Andockstation: \"",?.~.name,"\""));
" Z; n$ y* Z1 R5 A. s9 C# r5 _ else
0 a+ h& F+ U0 M. ]$ y3 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 j' ~1 K% P" g
to_str("in docking station: \"",?.~.name,"\"")); ' ^% \. ?1 ]" N) b; [+ F" Z2 b1 s
end;
' _$ P2 H9 }: e+ A8 n else6 g7 U9 @, x0 L4 B9 q, N" {% S7 o
@.Destination := assignLObj[1,row];0 L% J7 Y7 j; S) y. M) \2 V
end;
$ l3 Q C+ A" F- `& b newDirection(@);
4 v$ O' A: d1 g) F @.HasOrder := true;
3 g6 {& o, N- ?9 d9 ^+ S end;
1 P7 b: [- U2 M end;
4 H9 {/ b% n; _* R9 cend; -- of the method
+ v+ e2 d& v2 O" A- x |