/* called by: entrance ctrl of the object 'track'9 E3 W& ?% c* K
*/
" z$ L4 B4 E, ^is
4 `) I0 Z- E% K3 X& d8 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;* Q# v+ e# f+ R' h
do
C% g% \5 h$ |2 I, H' O/ ^ Lan := rootfolder.Internal.Tools.AOLlanguage;. f! ?% |' w3 l* B, T$ K
if current = @.Destination -- else return( a8 f- Q6 r2 D, [
then
5 G( M- M4 d( q9 r7 e$ w7 p @.Destination := void;
" o$ c8 V/ }2 E if @.occupied then0 c# o$ T; Q* j0 G' q7 H
part := @.cont;
+ ]7 p M- B+ @) G; z& @+ w @.transpOrder := void;
. O g& x* J; k8 [$ g3 @/ ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 q3 D. G8 ^! C9 r y% u. ~" K
@,root.eventcontroller.simTime);$ P/ B$ \# f0 J; _# b1 z! ~. L
@.HasOrder := false;% F+ N, K+ {/ n: }3 i
@.DrivingHome := true;5 }8 X( d" d; @3 ^8 n
rgManager.tryToStartTransOrder;) a; v: `2 Q8 c* ^' o0 r1 H$ I
if @.Destination = void
7 U+ y6 G M. x% Y6 V3 I* z: A then -- no transport order for vehicle @
$ J( [ f/ k! ^- z, C- n n7 c @.Destination :=
7 ?& l, E( v z7 m" A* Q! @9 H rgManager.nearestFreeStation(@,track.~);6 a: j( {" r! r. d6 s; N
newDirection(@);
0 ^$ ?9 n' w) ^4 p4 _: v if @.Destination /= void then' \. g0 ]0 {$ Z6 P
@.Destination.NumReservation :=
$ [( k$ l+ R P$ V. D* O @.Destination.NumReservation + 1;1 Y+ N# s, ~8 y
end;
, {- D# L, j# x @.CurrIcon := "drivingHome";
( A6 L7 ~" d8 \( {2 E. P, i @.DrivingHome := true;; j. D6 W- G- g/ T6 K
end;
6 E& H+ _! o% s else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 N# K: D" | z- U$ i
part := @.transpOrder;
6 T, b2 O- _& W" j0 y* S part.move(@);-- load part
! w9 z3 |' {$ R( q A3 T9 ~ @.CurrIcon := "load";
% d1 o) T5 W$ x, Y4 t( q! D# v GlobalDistObj := part.globDestination;5 E: r8 h% e% Y. R; B/ C5 \$ G
assignLObj := rgmanager.rgAssignL;
# _6 w- m2 A1 R$ T row := assignLObj.getRowNo(GlobalDistObj);
8 R3 Z3 [! K0 U if Row = -1 then -- since 70
, ^! y# G2 d2 |* `9 I if lan=1 then1 U2 d/ u+ n/ F( ^* r) p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ Q, v0 z$ c1 N/ m8 G to_str("in der Andockstation: \"",?.~.name,"\""));+ H# g: K3 M% ]4 ]
else) W9 S1 b& \( N. U' N, D5 _& z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# o. f: ?8 t0 q* m7 }/ z to_str("in docking station: \"",?.~.name,"\"")); 0 p& d0 p' L b8 E/ ^. C
end;
1 o0 k, n9 P, l" U else
`7 r J- K. f5 d$ ^* z @.Destination := assignLObj[1,row];
' p @* @7 c! T) p/ o) n: I' j2 n end;
5 R+ W7 m7 k- B1 o5 t* I9 k" N newDirection(@);
. o3 r( C$ R; o$ e3 | @.HasOrder := true;
7 @( V% o0 M. m- v3 K, k end;! q+ X/ m M& ]: p
end;
, y- e& \+ }( R2 Z5 oend; -- of the method& t9 w6 b& i, I9 Y
|