/* called by: entrance ctrl of the object 'track'
: N1 T( W3 ~8 B' R*/4 q3 P" ]- r0 l0 X# L9 D) N
is
6 q. W1 K A# d part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 R) U) S# F* x9 m& ]8 I1 _
do
- a2 G" q, R! D. I Lan := rootfolder.Internal.Tools.AOLlanguage;
$ D1 a( f4 _5 K( J5 | if current = @.Destination -- else return. m% R- J* J+ I- J( O' g
then
% v) H# ~. B# W @.Destination := void;
+ i4 h( K: {5 g* d if @.occupied then' c3 f2 }8 f n" v3 L& @+ b9 N
part := @.cont;, U U7 G3 s, R5 Y0 c6 d0 Z
@.transpOrder := void;
% h" r* X% {! v# Y1 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, B% c+ j; F& j
@,root.eventcontroller.simTime);
' T( M4 }/ H7 [/ m& E6 d" x @.HasOrder := false;- B/ o$ |( Y: O5 R0 I, z/ G$ d% o
@.DrivingHome := true;
9 l/ U0 i" a- I5 t. K* ] rgManager.tryToStartTransOrder;
7 _& C$ Q) N( r( j" S* S* C if @.Destination = void7 [ \4 U- ~& { E
then -- no transport order for vehicle @; Q, V% P0 }& _+ O9 V
@.Destination :=
$ a5 R& A& [7 c. v- N1 G" m0 B rgManager.nearestFreeStation(@,track.~);$ K* P8 g/ E9 T7 P& C4 t
newDirection(@);
" E& B, f9 V) X2 v b( ?3 i if @.Destination /= void then' a: n. {& A3 _. {3 a/ r
@.Destination.NumReservation :=
2 U N" e; M/ u' Y* `4 q. o. K, o4 j @.Destination.NumReservation + 1;9 K6 F/ |- f1 K
end;
, C4 W, J; ?6 u9 I/ o @.CurrIcon := "drivingHome";; B3 `! M, O% K1 _+ X* b) `
@.DrivingHome := true;
$ i+ l0 L. V; G7 r end;
$ S" x2 P, B) n7 e/ v. S) \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 o. T; B/ Z* o: G0 i( Z part := @.transpOrder;0 k3 O8 R2 }% }$ x8 j
part.move(@);-- load part! t! X. r3 o4 r( W7 B
@.CurrIcon := "load";+ b4 i* f0 `" Y. \$ f4 n6 Z
GlobalDistObj := part.globDestination;
6 b5 R# J( `, Z2 J2 h8 X assignLObj := rgmanager.rgAssignL;2 O8 @8 q& c# u8 n! A
row := assignLObj.getRowNo(GlobalDistObj);
8 F: R2 I1 o/ a8 D' F; V if Row = -1 then -- since 709 t2 R. C- n% ?0 j P
if lan=1 then
1 V# ~, H0 z. Q0 }) E9 w9 j1 P0 c9 N# ~7 ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
v8 f* \1 i( m: i- r9 s( v to_str("in der Andockstation: \"",?.~.name,"\""));
( l/ V# g, A( ~& g' }" @8 ] else$ ^% Q* e( ]3 j9 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! l& e) \. }7 c+ @
to_str("in docking station: \"",?.~.name,"\"")); ! ?- R. s1 R: S9 c$ [' F# U
end;
; O, U- B. N& O" i5 q j else
p' ], r/ \+ x- G0 w5 X c @.Destination := assignLObj[1,row];
$ y" g. T: Y) ~3 F& Q& v, r: P C end;
7 j- S- k! W# c. { newDirection(@);
6 |* p0 _7 p0 J9 S0 z @.HasOrder := true;
/ b* }; [( Z4 Z9 W% R/ b end;
6 i8 A+ Z0 x' U0 Q end;
9 \/ E/ i6 ?; u* N; E7 A* w8 g( V+ aend; -- of the method0 }1 H5 m" g' [$ S5 h# {6 \+ z: s+ p
|