/* called by: entrance ctrl of the object 'track'0 f1 O1 l; P7 \3 e
*/
8 f" E2 k( Y" w4 [is
! O6 K* J. {9 p8 C1 W/ t9 d% H part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 _6 i' [% _) u
do
$ x6 ^8 M* k9 e Lan := rootfolder.Internal.Tools.AOLlanguage;
% c4 X0 U3 M0 T5 k* W* r0 K if current = @.Destination -- else return
' Z, X& e* t# a+ y then
% y* i- [# ?7 I7 c) g; o H, O @.Destination := void;; y2 V, T' R7 S! T& x" c+ K
if @.occupied then
7 J! [7 J; C: j0 { part := @.cont;
) d; { _5 a7 U8 q! t @.transpOrder := void;
0 k% s: F8 H0 J) B% j3 U& s% p' O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 j2 V' f, n4 Y, d- I2 i! b6 x
@,root.eventcontroller.simTime);
" R+ l) T/ L) A+ H @.HasOrder := false;
0 N! t: T, x1 K2 O( o, O @.DrivingHome := true;6 f6 B. F( y U7 G1 ^
rgManager.tryToStartTransOrder;, i Y: F# P$ i7 w4 c3 h) A1 b' A
if @.Destination = void
3 @% X7 Q: l; r3 Q then -- no transport order for vehicle @, F A: K+ }1 B5 o& B( `9 x
@.Destination :=
3 a6 b" \+ S0 {; l! e rgManager.nearestFreeStation(@,track.~);* Z2 H7 N: b* P
newDirection(@);
: i7 o+ A3 l, v: _ if @.Destination /= void then
; `3 p2 k; \* j2 u. y4 r' l @.Destination.NumReservation :=9 [* W e- g7 \& k" y9 |
@.Destination.NumReservation + 1; R" _# E# Z! y" r# j9 q
end;+ i+ Y. z& d1 v8 H- a: ]: D
@.CurrIcon := "drivingHome";! n. g7 q8 }( w6 R
@.DrivingHome := true;
- K! o8 G) W, Y4 a* _ end;( a, U8 P& H5 C+ d# K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 u% e6 K; l$ U9 E; g part := @.transpOrder;2 c: ?- E# ?! ~. o4 }" m! V; B
part.move(@);-- load part
4 d! W& r" t- L7 Q6 F: ] @.CurrIcon := "load";
" g3 u. o: U, p" c( h GlobalDistObj := part.globDestination;
3 V# a: I$ j3 F. w5 T assignLObj := rgmanager.rgAssignL;2 J. c( Y6 U E! n3 z& O1 M
row := assignLObj.getRowNo(GlobalDistObj);
5 A' _3 `+ I* ^6 o7 u( q! D0 \; i3 b if Row = -1 then -- since 70' Y2 U2 W* s$ U6 f
if lan=1 then) Z# l5 _, p3 I( D( |! u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 L4 n- {0 E7 g( N to_str("in der Andockstation: \"",?.~.name,"\""));5 b% n# d& `; Z4 ~, y1 Y; f
else; p3 @# L. \- N1 {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 z" C5 L, m* j- C$ `# S0 T
to_str("in docking station: \"",?.~.name,"\""));
( d4 H$ c: x5 F6 I: \ end;& c( a9 W) A4 A5 @) i
else, b. ?5 G: |, Z
@.Destination := assignLObj[1,row];
0 t6 N& }( V+ a0 L3 m/ G/ P" \# d) B end; # V2 t+ X2 g0 H( m2 [7 z1 x) z$ C
newDirection(@); h4 K) g0 b( ^! {5 @
@.HasOrder := true;
: O- Y% c0 [4 f# K, j/ U i end;
5 I7 x2 @4 \: N. |+ ]( ?" B end;
+ A3 R, ^% j, Z0 oend; -- of the method
& T u1 ~: C0 s# @ |