/* called by: entrance ctrl of the object 'track'2 }# B8 j0 z0 x% m& e* ^8 O
*/
3 J. Y# v5 ?% R4 c& his) K4 L" P8 K; S/ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ] D7 N2 _( ]# u- W/ c1 j
do0 }& X; y- ^) y, ^1 [3 V. I( V
Lan := rootfolder.Internal.Tools.AOLlanguage;/ U5 `' K1 l* M5 c8 _
if current = @.Destination -- else return
. E8 U, |* @$ p4 ]2 G then. e2 m/ E; Q3 N4 [* @
@.Destination := void;
% A6 t. G, M: {% L, @ S9 e. e if @.occupied then
6 P$ k" E: f. J4 k) o: y part := @.cont;
3 E$ ?4 w) N% ~, ~1 t) [. ] @.transpOrder := void;/ q* ~" `5 f/ v' }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G1 U1 I0 M6 U/ w+ P' P3 X4 N
@,root.eventcontroller.simTime);! ]8 [9 ?* ?9 O7 {/ i2 G* P% e
@.HasOrder := false;0 Q9 K7 n2 D, F) t: n, @. v
@.DrivingHome := true;& M0 h \0 I3 D% V# K
rgManager.tryToStartTransOrder;7 d9 n8 i8 }0 C) O! L
if @.Destination = void" W% {4 k, _! h8 q7 ?6 U: P: a( Y/ k. |
then -- no transport order for vehicle @5 s; |! R5 r, O6 ^: _& ?3 M& x, [
@.Destination :=% [* M% M x: G- Y+ q, Y
rgManager.nearestFreeStation(@,track.~);
0 R7 l' W! |5 c7 d. D5 N: d newDirection(@); + @4 O2 i$ E. S$ F+ u
if @.Destination /= void then
5 g9 z* O7 B0 g3 C @.Destination.NumReservation :=
. ~. m- Q& O% x, z9 b( U @.Destination.NumReservation + 1;, h1 e8 U) C) Y
end;
: C, a l6 W5 p" L/ [ @.CurrIcon := "drivingHome";
3 }0 W* d+ r2 f' ~ n @.DrivingHome := true;
% b: |4 G) t+ I end;
4 i+ s$ v/ B2 \: c else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ?, m5 K5 @& }7 \7 x& }
part := @.transpOrder;# _3 F7 a. u* T5 e; l
part.move(@);-- load part$ A0 ~6 Z" Y. P |6 ^- N4 q6 L
@.CurrIcon := "load";' v2 e' v1 Z/ @4 V7 I# }2 C
GlobalDistObj := part.globDestination;, ^% e* k. q- D! u1 \6 V4 m
assignLObj := rgmanager.rgAssignL;
7 U7 c0 a7 f6 f- F5 K" e5 j row := assignLObj.getRowNo(GlobalDistObj);! p7 _, d- g5 r2 }& N: F
if Row = -1 then -- since 703 W( G/ ^$ L b; l, e6 T
if lan=1 then A$ f& L7 `( f5 A; @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 w, Z) c; B3 a$ F: D$ D/ R to_str("in der Andockstation: \"",?.~.name,"\""));- [4 C% D3 _, S4 b5 i# q6 _
else. u2 U# r: t% V" Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 F& C2 F" x* F# W" ]
to_str("in docking station: \"",?.~.name,"\"")); 3 J( P8 K$ Z( b& V/ y& l5 `
end;' ]. V, ?$ u( c, |4 B, D
else
\/ b& S: u% L5 ~6 |- `+ t5 s @.Destination := assignLObj[1,row];# O# ~7 X7 Q# B3 m C4 |
end; , I. ?# k9 o0 ]' a, [
newDirection(@);
8 { [; A. |# h: a1 h @.HasOrder := true;- K+ `! i% N& e1 X
end;+ `9 R0 ~" T$ a6 b% b% O
end;1 k% X' U( N) q2 C1 {7 {) _
end; -- of the method. t7 N R) `$ x$ } \* \
|