/* called by: entrance ctrl of the object 'track'
* m; J8 H/ a$ ?* X9 e" z- {9 f, X*/
7 a" h4 G# f/ k' E4 [" d# `is
( r4 X: ?2 X9 V' i part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ r1 ?! ^: ~3 s' d* q3 y( r
do0 w$ Z6 U& W6 ?! V0 x
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 ` W: c; N' |: X: M if current = @.Destination -- else return3 d/ s- i% h7 D$ e
then
6 p0 B+ F' \; o+ M @.Destination := void;. n; l. Q3 m7 n- }: f
if @.occupied then5 S0 z7 h1 g+ a! m1 t1 \% N3 x
part := @.cont;
; Y! e0 F8 B2 h @.transpOrder := void;( j' W/ N* S4 u, C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- ]+ |: @8 g5 ^# i* Q2 E
@,root.eventcontroller.simTime);
+ c7 |# ~/ o* E" i9 i @.HasOrder := false;
- m0 l6 a; p; v: y8 c @.DrivingHome := true;
8 b& b$ I% T5 h9 B( \% N) u rgManager.tryToStartTransOrder;
; [! S+ J' U/ E, ~' w" l8 H if @.Destination = void
2 N: s6 k6 J4 {# g: n; F V3 N then -- no transport order for vehicle @+ Y; Y7 m9 a9 ^, j3 @* k
@.Destination :=
8 T5 E; `6 V _6 D. | rgManager.nearestFreeStation(@,track.~);
$ [2 ? ^: v7 S6 d newDirection(@);
% {9 g5 e. X8 }: z1 p- Y) D if @.Destination /= void then
" J# q4 l' c* c# t0 `, u$ P @.Destination.NumReservation :=
2 H2 v- O% t! O8 g @.Destination.NumReservation + 1;$ A$ d5 r) w* x9 h* s$ i
end;/ F0 G1 Q, v; N3 C/ C9 ^3 d
@.CurrIcon := "drivingHome";
( C6 `6 F0 J$ S5 x @.DrivingHome := true;
, E0 ^) k1 K: {: L. C/ y, f end;1 r8 y* b, y: p3 p* A0 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! i) [* C2 }& y$ X! ]4 e9 W part := @.transpOrder;
% i2 x9 p' l1 J9 A part.move(@);-- load part$ c3 i2 f# \2 x- t* A
@.CurrIcon := "load";
4 W: _, N4 y1 Z3 X" f1 a V6 |9 V3 f GlobalDistObj := part.globDestination;
/ e/ D7 y& F, _# n: H F assignLObj := rgmanager.rgAssignL;
9 c, c3 I. T/ t/ H- z# h row := assignLObj.getRowNo(GlobalDistObj);3 [/ y. J; T c# U; c
if Row = -1 then -- since 70
# E2 F. g' F: h D& g if lan=1 then
: i. L; {' I- |7 q0 b$ M8 c& C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- n' ~9 C+ d! L j. I to_str("in der Andockstation: \"",?.~.name,"\""));
3 s; [: U2 Z5 t: Y- h5 _ else
+ l- B! b6 K4 u- Z2 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: \8 l- ~$ N3 D+ ]% E: C
to_str("in docking station: \"",?.~.name,"\"")); $ v7 o9 A# \" c; y% O+ F
end;0 }% S, X. \* g
else
" g! o1 a" ?/ g* l @.Destination := assignLObj[1,row];: D6 ?0 P4 R2 `0 h: D* V1 _! J% }; I
end; + I5 ?1 c7 ?; r
newDirection(@);# u$ S: f! E' o# j7 w! T
@.HasOrder := true;
9 f9 d3 E( w4 t m7 o( ` end;
+ r, C9 _$ ]- ^. M end;
$ ~( N( |! d( o, Y: ]) ]# ]! oend; -- of the method
+ l+ @; A. o* B: H: \2 L/ w0 @! e |