/* called by: entrance ctrl of the object 'track'1 s4 e! l! j7 y# e. }% ?9 G# L
*/
# Y9 y, V" \/ W4 U( f! gis
& Y! U' S$ ?- K" o# P) j n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 i, w1 G; n& ado* e( y7 D; t5 ]$ S/ M: w
Lan := rootfolder.Internal.Tools.AOLlanguage;
# q3 O$ y( h0 A: h! U, B if current = @.Destination -- else return* Q% x* d. |, M& c3 i/ Y5 m4 Y
then
: m7 k. B N) F. p$ J9 k- C1 K! Z @.Destination := void;7 a6 J0 \, u, K" j8 _' H1 M& Y% z
if @.occupied then
/ G6 O' l' x* J9 M8 f- a, i part := @.cont;/ U8 i% L2 a$ X* y7 z$ }# Q5 @
@.transpOrder := void;+ {4 N4 s' N( G8 p$ ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 B0 g) C2 ^+ S4 L
@,root.eventcontroller.simTime);( A6 p8 p0 r L4 k( k
@.HasOrder := false;
" `! f4 o0 i' h4 h @.DrivingHome := true;/ U. L- M/ |6 j+ G4 p
rgManager.tryToStartTransOrder;" U9 m/ m7 a$ `, s
if @.Destination = void
/ X0 s. [& ]8 K" O/ p3 C then -- no transport order for vehicle @" M# @8 y |! y2 k9 E) D( t
@.Destination :=
/ ~' D4 k* E$ c5 a rgManager.nearestFreeStation(@,track.~);
2 f3 t# `. q& E5 M5 I$ O9 r newDirection(@); 7 L( n2 A X, O$ }7 `7 K
if @.Destination /= void then
& G# W7 ]( g5 q ?1 n. \ @.Destination.NumReservation :=* f, J6 E2 u% q1 R+ H4 ]$ M
@.Destination.NumReservation + 1;
% n* A. Q0 N% a7 J) J8 I2 l end;% }1 S* G& j, o# A M# Y
@.CurrIcon := "drivingHome";1 X9 M: E3 X% W4 C' l9 f' ?
@.DrivingHome := true;
! ^8 X* f" W& E. E: A end;1 ?7 K: F+ D2 z- e7 F( s! M M$ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 x8 r: l' }) [. X2 I$ \
part := @.transpOrder;
X; t4 a4 i6 V- r! r part.move(@);-- load part
" m3 Y$ Q8 i5 E; U2 y @.CurrIcon := "load";6 a9 }+ u# ~9 T) `' O9 ~1 D7 {! ]
GlobalDistObj := part.globDestination;
& r1 }4 t. ]' k( I* R assignLObj := rgmanager.rgAssignL;
4 ?3 g; ^" h/ h5 ~1 x. N5 L- M/ }3 m row := assignLObj.getRowNo(GlobalDistObj);9 u4 i' E3 r7 |& A/ g( t" H( R
if Row = -1 then -- since 707 u8 n6 V3 Y$ n
if lan=1 then
7 g% G, d/ w; { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! b: V: a) A% `* h2 S2 Z0 y to_str("in der Andockstation: \"",?.~.name,"\""));9 b! f9 f7 ` u, }8 H" h( N
else' `. o7 |3 ]& S6 h0 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& h2 B0 q3 Y8 p" C X
to_str("in docking station: \"",?.~.name,"\"")); ( R7 \' g. P' w$ {+ p/ N9 T! u8 C
end;
) E8 P3 n- F1 ]5 w, b9 y. ~ else
1 c. W' g6 S, \5 e6 m2 ^ @.Destination := assignLObj[1,row];0 t: k: M( n6 j- g( |. ^$ S0 i
end;
4 \& x; z! T0 o newDirection(@);
9 D0 I6 n5 H/ v U2 N' ` @.HasOrder := true;* N# F) e& L" ?+ X, h
end;
' ?: W1 n0 F a& v# F; l end;6 z$ \( m* j9 [- n# o
end; -- of the method& d3 d2 q3 w2 F# g% H
|