/* called by: entrance ctrl of the object 'track'
. D3 j: {) ]$ {3 \" i% J) L; l2 }*/
% E0 K r- ]2 L" L \$ H& n4 wis) A8 F) ^$ N! T/ Q `, F6 [/ C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" C% A: g1 u" Z1 o% r4 f4 [
do
4 O8 X* Z! }2 F4 N Lan := rootfolder.Internal.Tools.AOLlanguage;
- b& N4 K) `+ r* a+ ] if current = @.Destination -- else return
# X: G# ]; T% s- N9 r then' J5 ^5 e2 y+ ~- N5 N+ Q
@.Destination := void;0 f5 p" V) F. r" u8 L2 b: q$ j8 G
if @.occupied then
5 `3 {' a2 j: J6 ]0 P part := @.cont;) h+ Z7 c% e$ g6 S1 Q6 Y9 z6 ?- }1 s4 X
@.transpOrder := void;7 n; J# G* ~( L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. b- [; B8 F6 M( a @,root.eventcontroller.simTime);
: |5 I* B8 h! {" X! W7 M- I @.HasOrder := false;3 M, ^' B' d( Q6 `
@.DrivingHome := true;
, I6 J" l; @5 F rgManager.tryToStartTransOrder;
2 l. v9 Y. H- V. c1 ` if @.Destination = void
5 ~# @; i) y7 g$ q" M then -- no transport order for vehicle @
" D. ?, Q6 [* l) r. j6 h" E" c @.Destination :=
6 M0 b0 m9 t, ~: ^$ \" ~7 f rgManager.nearestFreeStation(@,track.~);% W* |" M% q; H
newDirection(@); " b4 k. i( K2 d; D' x3 ]8 Y
if @.Destination /= void then
' F! D* S, L& ?' p2 l( _8 U) q1 { @.Destination.NumReservation :=; C* T% j/ u+ c) Z4 g- X1 |' [
@.Destination.NumReservation + 1;
) t* G" K: I; G5 u end;
' \, }/ k0 g6 p @.CurrIcon := "drivingHome";# k! E! j1 a1 e/ Z0 m0 L, ~8 W
@.DrivingHome := true;
" s" Q2 z) D9 ^$ c; f8 L end;! l4 U E% h$ b2 V1 ^% j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& l% L5 |6 Y, z
part := @.transpOrder;/ l) m) v; h8 X, |4 l' \6 S
part.move(@);-- load part! `) X5 U8 q6 p7 z# Y- [
@.CurrIcon := "load";
: _: g# I6 h0 Z0 W" X, l GlobalDistObj := part.globDestination;6 Q9 B% R' T+ I0 F, A& b
assignLObj := rgmanager.rgAssignL;
- C! B3 h1 M8 ~: _) u, T" b row := assignLObj.getRowNo(GlobalDistObj);
8 {; Z" T! k, X( ]1 g6 o( e if Row = -1 then -- since 70& L, R" r! _+ V: b: n, q- G! I
if lan=1 then5 M1 l, F' V Q1 s3 V" R* {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' G* I ^$ V- R$ _7 n4 N to_str("in der Andockstation: \"",?.~.name,"\""));
* M, j: g0 y1 } I else0 s8 f: G2 U( d" n4 u% M0 D. p. e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' j$ J5 B. k0 U) v; s: A
to_str("in docking station: \"",?.~.name,"\"")); 3 ?; n h9 [/ D9 Y
end;! ]! I/ L0 d+ a4 x2 Y8 H2 [
else
* F9 R/ H6 z' y# T @.Destination := assignLObj[1,row];
4 ?) B% j4 v8 c5 s0 J& ]( ` end;
5 w2 e0 E9 `9 @4 Q newDirection(@);2 Y7 G$ z, N. l; c$ _
@.HasOrder := true;
% _$ C: @. B/ C, \* q. g end;
l' G B) Q0 C: ?/ l; {: P2 Z end;
\7 f0 f+ A9 y) _! k- L3 |& ~$ Cend; -- of the method
( H& k4 A' \" b! ^# D6 a |