/* called by: entrance ctrl of the object 'track'
# z$ ]; ~6 D. Q5 t5 O$ E+ E/ k*/" n/ t. _6 X5 `/ L1 u
is
/ X/ t2 N+ q: X7 J0 d part, GlobalDistObj, assignLObj:object;row,Lan:integer; _3 }! w- \. t: K/ q% _. D& _& J8 e
do: H" F# }" |8 r5 H7 v- j, n6 l
Lan := rootfolder.Internal.Tools.AOLlanguage;3 n. ?! J* P% s- A2 I# T% r
if current = @.Destination -- else return
: e9 X9 X9 k6 u. \ then
0 o; ~0 g3 P7 e$ Y2 a @.Destination := void;& |3 f0 K' u4 j8 i' o' p! A9 K
if @.occupied then% C/ ~9 K, X+ u, J$ g
part := @.cont;! v! J7 h' s2 [, h# F9 Z
@.transpOrder := void;( N2 i! T& J- a( x6 v/ ?( b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 M; I _: B/ P; Q! C. j @,root.eventcontroller.simTime);
5 B' i" g4 t% G' R @.HasOrder := false;
% o7 N2 V9 C* Q/ z' U% o6 i( ]: L @.DrivingHome := true;
( M; a2 S8 r7 C8 @ rgManager.tryToStartTransOrder;
5 o' E1 ^. q" [% \% W2 c! y, ^$ q if @.Destination = void
9 C/ o' E0 ^ |8 p" `5 m then -- no transport order for vehicle @$ i, V: B& h# A3 g5 e+ q
@.Destination :=
6 Y) ~5 K* ?- |0 D+ k rgManager.nearestFreeStation(@,track.~);& I N7 |2 h5 ?' U! @- \
newDirection(@); . D8 c/ s Z* y! S1 D! s4 u
if @.Destination /= void then
9 X) ~, X" M& ?5 s( i) u: _ @.Destination.NumReservation :=. {& N! t$ i/ A* f* D; k
@.Destination.NumReservation + 1;
4 O( O% T- j: c: s; Q end;3 x' U' _3 y* u v
@.CurrIcon := "drivingHome";
2 o0 @" ?# y: l( x2 Q) T6 K @.DrivingHome := true;
& A* {+ g& a& t4 T8 n" Y end;# n( A8 U* G) @" F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ H# G/ X B/ u5 H part := @.transpOrder;! }: h" l, T+ C. p) p- S" [
part.move(@);-- load part# t7 P8 G2 H9 N
@.CurrIcon := "load";9 e& l$ i4 E. u! p1 f
GlobalDistObj := part.globDestination;
0 \! b7 u. s' N assignLObj := rgmanager.rgAssignL;# i4 t/ K4 M) q3 e( q) Q, k! Y8 E `% s
row := assignLObj.getRowNo(GlobalDistObj);0 M/ U, E4 n- F# G
if Row = -1 then -- since 70# u" n! W' h+ c. X5 \+ H
if lan=1 then
* B, g! Q& Q5 h# D6 ~" ]: c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 m& E& H+ s3 u/ o5 s
to_str("in der Andockstation: \"",?.~.name,"\""));& s3 K0 Q, M( B+ o0 w
else
' w. M8 J7 I1 A& A8 W! r5 ]% J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ s$ i+ t8 W B to_str("in docking station: \"",?.~.name,"\"")); # x ~; {& a1 k3 H$ d
end;
$ y6 n5 o: b) i# g; s+ c5 ? else
" z e# `2 Y8 D* j @.Destination := assignLObj[1,row];
- H6 i7 B5 ]6 F1 f end;
- B4 G! E( Y$ H newDirection(@); K I8 W2 o' W/ F6 t/ g% F4 e
@.HasOrder := true;/ C3 y; [2 J, ^3 N% f
end;
0 q; _6 w9 g' L& `- k end;
& g* q, k7 ^/ t/ h. I* [5 Fend; -- of the method
$ z8 J5 [8 E! |9 \2 W |