/* called by: entrance ctrl of the object 'track'
( U& j5 D- X" [% @5 |4 Q% e1 H/ Q*/0 k/ ?; j9 H" ?
is
0 r/ O1 M7 V" Q6 e1 R9 z# p8 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;, y& E1 Y( L l2 ]. d5 @3 n
do w* y; N8 c( O6 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;$ g) G4 f& Q1 V; F
if current = @.Destination -- else return5 b- b/ Z- ^: ^, r/ h4 ]+ d
then
0 B3 _' f4 }6 V7 W. h9 l8 [ @.Destination := void;; n0 m9 f. H9 Z, J
if @.occupied then
( f( o0 [* K* W part := @.cont;$ V+ u6 ] N1 n0 K2 J" E+ [
@.transpOrder := void;
& x0 [* M+ B2 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; U$ z0 Z3 T3 }, l2 T5 @; N* P
@,root.eventcontroller.simTime); c3 P' w) Q: E- k; S" h
@.HasOrder := false;
1 T6 N! p B) D' D: c. \+ Y5 c @.DrivingHome := true;) J9 w4 S. f; Z5 P
rgManager.tryToStartTransOrder;: v X6 M8 T$ B" Q
if @.Destination = void
; b. w2 u& ]/ \. c then -- no transport order for vehicle @7 r, b5 i, _, r+ C( q/ f7 b) j8 B
@.Destination :=6 m5 i. T' k$ n; N3 _
rgManager.nearestFreeStation(@,track.~);
2 _" `- Z) z/ D: J0 D: B" w H) O newDirection(@); . S5 {' M+ w8 s" U; {7 e- I4 F( C
if @.Destination /= void then
$ L u$ d" w9 x @.Destination.NumReservation :=% [! v* R: X% Y
@.Destination.NumReservation + 1;
7 @5 e( |. `( e6 C2 U- R H, K end;
2 \2 z, X% h" Y* E1 T @.CurrIcon := "drivingHome";
" k# S# K0 D2 u2 [- j @.DrivingHome := true;3 R2 z9 @4 f. E0 v) d, V& }
end;; _5 ~/ D4 I% ?' l- C9 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 C2 x" \$ L7 @5 |# m5 R. l
part := @.transpOrder;
$ P8 H# U, S2 Y/ n, H& N part.move(@);-- load part
1 r, s5 s, Q, r6 W @.CurrIcon := "load";7 ?3 o. D# G$ E- G9 M. V, B$ X. i
GlobalDistObj := part.globDestination;
9 ?8 \" [: |7 F a$ W& ^' I4 ~0 j assignLObj := rgmanager.rgAssignL;
+ U3 P0 ^$ C: q5 [6 P row := assignLObj.getRowNo(GlobalDistObj);( q* {) I: a; b8 A% }; N; A
if Row = -1 then -- since 70: U# h8 p, j( g1 |. @( c
if lan=1 then$ A4 i4 v" Z; U4 q' u3 m9 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, J: f! k4 o9 x1 C to_str("in der Andockstation: \"",?.~.name,"\""));& _$ \, \9 k7 [
else
; {5 s/ @% ^6 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; T& a& i* G2 J, d to_str("in docking station: \"",?.~.name,"\"")); , y0 M) j6 U- m5 a) E
end;
; `7 H$ z( }+ i# G1 G+ ` else
. @! s9 d' s! h6 z @.Destination := assignLObj[1,row];
0 X5 u- v( a; U- Z' X8 x end; , v- M# U& d. y+ `$ ?
newDirection(@);
4 a- \, n8 Q! T" ]; ]5 T @.HasOrder := true;
; |: P# X3 u! l7 z end; j" M2 y: g$ w( N5 y1 [
end;
, u$ V( R, S$ H1 kend; -- of the method: W }) q' x6 ?( }1 ^/ s
|