/* called by: entrance ctrl of the object 'track'
" i! a2 J& D$ Q1 ]$ g*/
9 _. J; A7 R$ d' Kis
: z" `& w. m+ i1 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer; k* s7 I- G! S
do/ ^ M! P/ K9 a6 F
Lan := rootfolder.Internal.Tools.AOLlanguage;, N9 M2 ~: S; ?! {+ f" P- l
if current = @.Destination -- else return1 F2 }9 E2 J7 k
then
4 _% t9 {0 u0 Y! X& i) v& i @.Destination := void;0 v' b: R) S4 I9 }
if @.occupied then
- N$ Y( D8 [. S$ s part := @.cont;0 |* Q! y0 S/ M" T
@.transpOrder := void;
4 z6 N8 y# Z- K& U6 t, y3 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 F8 O3 C. @( U# O5 S+ c
@,root.eventcontroller.simTime); C4 \) j6 k' V
@.HasOrder := false; K( L2 J, F0 ~3 z9 e
@.DrivingHome := true;
9 f9 E+ N4 m: v2 n/ s% X rgManager.tryToStartTransOrder;; T/ `" x: n7 \' _2 v
if @.Destination = void
; Y* B2 Z3 [ j7 x: u then -- no transport order for vehicle @7 o5 u% x7 D9 Y8 c1 P
@.Destination :=
/ [. t) t' `; ~/ g n rgManager.nearestFreeStation(@,track.~);
0 \ O3 Z9 x, u& ] newDirection(@); 3 s! f8 E0 ? H0 G& n: a
if @.Destination /= void then1 n# X2 h$ E4 Q& D
@.Destination.NumReservation :=; o, O$ w9 ^* S: j4 o# c
@.Destination.NumReservation + 1;. _2 }0 ?; w( P# B# V+ l
end; L9 t% A( l) z1 t/ D& ?6 D
@.CurrIcon := "drivingHome";) v; q& K B4 w! A
@.DrivingHome := true;
, z y9 v- T+ I( m/ q- |6 q1 J" v end;9 ~" n- K; R) W3 t6 J6 l% |" P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) u; b l0 H- ?, W part := @.transpOrder;$ |' D/ h/ X0 L) _$ [7 y2 V
part.move(@);-- load part% d4 m% k- b0 T* S6 k6 R/ B
@.CurrIcon := "load";
) S7 c$ u* v, ] t GlobalDistObj := part.globDestination;. I0 S& c5 N Q8 k' e c
assignLObj := rgmanager.rgAssignL;/ L. r2 I q+ k. a' w: b L
row := assignLObj.getRowNo(GlobalDistObj);) ]8 ^- N4 G# O
if Row = -1 then -- since 70
' Y2 J$ y/ v: A. L$ x- A+ y7 j if lan=1 then
. w |9 y5 V Y/ S1 L9 |; k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 y- \+ D+ U: ^# ] to_str("in der Andockstation: \"",?.~.name,"\""));
7 F0 f9 O9 n3 H. a2 i, J9 s7 ] else% l8 f$ A' T5 m6 `6 o/ f) u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) l1 j% O6 z2 ?: Q! S
to_str("in docking station: \"",?.~.name,"\"")); 3 Q8 }, K# @7 B) ~9 A& D
end;: l& u7 y+ ~0 c$ G
else6 b+ Y, ]; k* E2 D. Z6 g- V2 ?
@.Destination := assignLObj[1,row];! P* x2 k' |0 R, f
end; - _0 E6 e: }2 G T& u) T
newDirection(@);
1 A5 f- B: B" g7 l* r* R! u @.HasOrder := true;, d1 W, I! R1 ]( d- Y
end;. |& L! w v. Q7 ^- _$ |$ @" J
end;
% U. X$ `% i8 j& P3 _end; -- of the method0 J j i' P% z! {; y
|