/* called by: entrance ctrl of the object 'track'
6 R7 |. x b2 _" v) w& M5 X' c*/
5 [. K b8 y; \5 @: ois
) ^, U7 ]; x/ x4 O) Y a$ r* {! z part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ `- J0 {& P7 {/ K; W( v3 F3 K
do
4 J0 m" j8 Z* a8 _# U1 h Lan := rootfolder.Internal.Tools.AOLlanguage;
' U% k L" s. a$ T( V if current = @.Destination -- else return
& F0 ~+ @4 i. a9 ?/ c8 Q$ s/ n ~ then
. D$ J) L- _& S8 m- h+ x @.Destination := void;9 i5 m) R3 W. q, [! i% w8 W: p
if @.occupied then
{2 N) [) k" S' h# t6 P( [ part := @.cont;
. E6 n! w/ @; m$ Y @.transpOrder := void;
) m) |2 {9 C% E' z( S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 h/ m( N& o1 p( z) W, z* ]
@,root.eventcontroller.simTime);" c0 Z, m' j& M. I
@.HasOrder := false;
\* l: Q, Y0 C% j5 m v2 @+ f/ ~ @.DrivingHome := true;' J9 i( e. B. t' y7 _) X2 A6 H
rgManager.tryToStartTransOrder;
: Z i2 d' b' u8 X% J$ k$ [5 S if @.Destination = void
8 R* T& I, U1 y then -- no transport order for vehicle @
. L% W% x& w- ]4 D: |5 n ? @.Destination :=, c* J* \* X9 q/ E
rgManager.nearestFreeStation(@,track.~);/ \# G' v5 \7 e' J% h& |
newDirection(@);
. Z, X5 k5 `) ^' c6 ` if @.Destination /= void then% q6 {* I$ a) d! n
@.Destination.NumReservation :=8 A8 a* ~+ [9 d2 w5 P! [* p
@.Destination.NumReservation + 1;* x% H0 F" F( S7 W, S5 D$ B
end;
( r+ J Y& E; w7 R. Y* e( z) l @.CurrIcon := "drivingHome";1 @3 F3 `( d7 Z
@.DrivingHome := true;
, V" q9 F, ?. n5 J4 V, ` end;
& L% |- U9 x2 j0 V, v. I& Y) Q- H else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 t3 T2 x0 J T5 N7 }0 J* T! C2 e- ]
part := @.transpOrder;2 }% N) [, l: a, M8 A7 |
part.move(@);-- load part. u/ D* V" N1 h& U! D( P
@.CurrIcon := "load";0 B0 C2 \% `. w! h( f9 C- p
GlobalDistObj := part.globDestination;$ w& i+ P' A# F
assignLObj := rgmanager.rgAssignL;
* J1 {* {* O& n, q' h3 h) J3 I: b row := assignLObj.getRowNo(GlobalDistObj);
5 e h3 ^* h/ a0 h" Z if Row = -1 then -- since 70( s9 X. m6 u" v) x) H1 U
if lan=1 then
) ^% e' q5 Z/ }. m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! V% _9 _9 p3 E9 \& v4 L# _ C" `( G
to_str("in der Andockstation: \"",?.~.name,"\""));2 j7 _2 E$ c9 x, _# X
else& S) ]0 O* v! d; h" s! U& z- k) r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 l6 C. U) b3 D, \8 o: @4 T8 T to_str("in docking station: \"",?.~.name,"\"")); * _* c- [0 n/ v3 Z. c, _6 O# G
end;
1 }5 [& ]. f8 H3 @ else
6 O, ?; c: g/ W8 l% q @.Destination := assignLObj[1,row];( G1 s* K# t( `! u
end; 3 | L8 b: I- c- w- M
newDirection(@);
1 K$ `: p0 F! ~ @.HasOrder := true;
/ k. p2 |" @" g: h0 X& O0 _4 Y end;
0 ]( u: p' Q: g+ {$ z7 b: ` end;
4 b& H# l8 }) E) C( n- S! c* gend; -- of the method
5 ]1 h! X% v* c1 V) A9 t |