/* called by: entrance ctrl of the object 'track'# h0 ]& p8 c/ ]1 f" |4 u
*/1 Y Q% a5 A% C# K
is
% ~4 O5 p. R$ B% ]' T- x& T# s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) s, H4 G) D7 {8 e4 v) ido
) O2 C7 E# I) M: v0 |% I; a. j Lan := rootfolder.Internal.Tools.AOLlanguage;
& C; T( r& v# a& ?! I if current = @.Destination -- else return
7 n0 i; T) K6 d5 @& _ then, f8 b' L' j3 m4 p/ j' r
@.Destination := void;% l4 Y$ j- }( j0 T
if @.occupied then6 H. j6 f' e8 ?! k Z2 n5 W
part := @.cont;* U2 h0 H8 F5 O! Z
@.transpOrder := void;
; n: P* h6 U4 E# u$ E$ y y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 s, [$ M- M* p! \
@,root.eventcontroller.simTime);- @+ B2 u2 z; O' W& U! _
@.HasOrder := false;: \- n3 f" V( G6 t) e
@.DrivingHome := true;
) h F' X' \& _) u X( O( a rgManager.tryToStartTransOrder;
7 R/ S# U1 t4 h; Q( R4 }. {3 u if @.Destination = void) D2 v: b" v9 J- e- F/ {5 B4 A
then -- no transport order for vehicle @: H4 p% |+ G6 u6 N
@.Destination :=
! [0 C; \5 i+ v& T rgManager.nearestFreeStation(@,track.~);& u% ]/ P+ Q4 Y. w5 a+ P6 b
newDirection(@);
( D. F" T$ o4 e; ] if @.Destination /= void then
6 `5 q2 {; n6 y' v1 T% d @.Destination.NumReservation :=
/ O" H& c \: }; t S( Q. V+ y5 V4 n @.Destination.NumReservation + 1;# y6 n: X1 ]" j# i8 a6 Y
end;
& W5 W7 z! h7 d- ]6 _ @.CurrIcon := "drivingHome";- R8 j: u! k+ s
@.DrivingHome := true;
$ H; G m; F2 |8 p: L4 x" c5 I: w end;1 _* O/ R7 |1 f! o7 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 `7 T' R9 a& ^6 v part := @.transpOrder;
; R; q9 q6 G' |0 d4 m part.move(@);-- load part/ O$ t9 S8 X( {$ e0 K" O
@.CurrIcon := "load";9 ^! T4 [% M2 q# d2 ~& {: k2 T" S6 J8 i
GlobalDistObj := part.globDestination;
3 U, b- _. C& _/ q. Z7 E assignLObj := rgmanager.rgAssignL;
" [: q* Q6 }9 o. w( f a row := assignLObj.getRowNo(GlobalDistObj);
& c- n- M1 m2 X0 u1 ?% i if Row = -1 then -- since 70) c H4 e9 P' E8 a
if lan=1 then
( h; H) m; b! t C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, a' q* p+ R, t
to_str("in der Andockstation: \"",?.~.name,"\""));
0 \3 c2 I2 x6 H else
9 M4 }: D- G! m9 R) G/ Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! s! C3 Z6 G g5 t( n4 f( X
to_str("in docking station: \"",?.~.name,"\"")); ' b# |) k# g5 [; K' _( p
end;6 J! [4 a1 V4 ^, H/ s
else
2 P) K( o `3 X. | @.Destination := assignLObj[1,row];" {( V; m. o0 T" R) D( [: V( ~7 O
end;
: d' r: t& l0 U newDirection(@);. }$ g: J* R6 Q, t5 j0 A
@.HasOrder := true;
7 J5 L) Y; W6 Q6 E- i end;$ s( ^7 P1 n7 \' R2 \3 Z3 N
end;
. r2 d4 N& z8 c8 W+ g: h1 a, zend; -- of the method
% l* G8 |8 K6 a, V+ ^/ t( m |