/* called by: entrance ctrl of the object 'track'
4 U9 n' x" y/ }8 G; ~: ~* o*/
8 A9 w& B+ |8 J+ m6 a* U0 iis3 m, C6 b3 B6 f, k1 X( P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, y& {# D; u) c5 Vdo
# Q- F K* `0 T K Lan := rootfolder.Internal.Tools.AOLlanguage;
4 V3 L4 ?; Q+ \4 f" q if current = @.Destination -- else return2 t% y7 s: ~# _$ B
then* F5 W" [4 w: {. V. T/ Z+ a
@.Destination := void;; h) o; B9 T# P. I7 Y/ X
if @.occupied then
3 T$ b7 q- O" w5 S. ^ part := @.cont;
( V; s" M2 k0 U0 x& R4 q @.transpOrder := void;
- M5 W. Y* M" X' j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* w) K5 A- F+ O. q) j- y
@,root.eventcontroller.simTime);. s. v" q! k$ w: \7 h ]; e
@.HasOrder := false;
: Y4 W5 w% q1 k& l2 t( f @.DrivingHome := true;
7 e: b" w/ `1 W. l# B rgManager.tryToStartTransOrder;' F+ j+ _5 Y. q- d! x' z, T
if @.Destination = void# r4 T5 w. U) D4 x3 e+ [: y! }
then -- no transport order for vehicle @
5 v8 q5 ~3 ]! Y9 t @.Destination :=, d2 H) \3 B9 g3 A) _" \8 ^$ V
rgManager.nearestFreeStation(@,track.~);* o0 X5 q ?3 w% h
newDirection(@); 6 `, W4 T! }; X- B* H
if @.Destination /= void then- V+ j9 o @& [2 Q5 f/ }& z7 R+ b
@.Destination.NumReservation :=
2 x z; G! C7 f3 L; i @.Destination.NumReservation + 1;1 x! r) G9 h( g- d
end;% K& q: d" S9 ^% P
@.CurrIcon := "drivingHome";
* ~' s6 ?" }+ p9 p9 \ @.DrivingHome := true;2 y! \/ G0 H$ G W. w9 }
end;" h+ @, R. x* q& V2 z; }. q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# v* H8 s5 A2 c9 y) S* E
part := @.transpOrder;
2 R0 M1 U6 A, ^) a part.move(@);-- load part
9 v8 C, k% h# Y! m/ p) b @.CurrIcon := "load";3 g9 z9 X- ~$ I% o1 _
GlobalDistObj := part.globDestination;# a3 l }5 i4 a
assignLObj := rgmanager.rgAssignL;6 @2 I/ n' T' c# X& k: U
row := assignLObj.getRowNo(GlobalDistObj);# i1 n. z: M* x
if Row = -1 then -- since 70* a; O$ r: g0 ~' j# i/ D7 C
if lan=1 then
2 h; Y$ {% M5 x0 U( o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 m, O9 k* N: R/ Y0 s# X, H7 |$ K to_str("in der Andockstation: \"",?.~.name,"\""));5 ]$ H, _7 ^- U; D
else4 Q& u1 j9 B0 V, ^ P4 W3 R; f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 \+ b5 X D0 O& v' S" w' q6 V; d to_str("in docking station: \"",?.~.name,"\"")); ( A$ `% v) O" R9 U1 B$ v: t) \
end;
& _5 G0 J- i! h& P$ C; { else
1 Q6 K* x$ D+ e! o @.Destination := assignLObj[1,row];
, \. G2 P$ M& V) d4 D0 J end;
?1 b u! Z0 @' J: t newDirection(@);
# U7 o4 j: e: t0 [4 b- b @.HasOrder := true;
3 i% N1 \2 w( ?& L% z, Q end;
2 l' r' u. R5 o3 x end;3 N: \) B0 B* @6 ]# p i9 R5 y9 e
end; -- of the method
2 c7 D8 l2 s/ `; p- u) N- E |