/* called by: entrance ctrl of the object 'track'
. e9 Y7 F2 l& f$ g/ G*/
& v5 A: X( Y) g* ~" _9 P5 k' pis }: k$ W1 b+ G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ A- _* H" Q5 N, v1 M" L8 rdo
7 ?) N. Q5 R6 V5 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
& v( W1 |# g* a& Z1 f if current = @.Destination -- else return: R1 u, q2 [7 ]( w5 N7 n! x
then, v6 e6 e: n- q9 A: D7 E5 G: S
@.Destination := void;# p' f+ k7 e {
if @.occupied then
) o; P5 Q0 S k9 N) y6 y+ [ part := @.cont;
+ u5 _( L- {% ^5 {. E1 ], M @.transpOrder := void;* Q, b6 b% M3 j- f. W% O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! U( G$ Q: d: f5 \ @,root.eventcontroller.simTime);) l* l% M3 ^; G: E
@.HasOrder := false;
w5 N7 x" \( n: w3 h9 B7 h @.DrivingHome := true;
0 @- T- w0 ?& r3 p* t# M rgManager.tryToStartTransOrder;% l" h" j1 u0 d( {
if @.Destination = void! j& P# g% A& J3 H0 Y: I2 v3 |4 `
then -- no transport order for vehicle @
2 n! T1 f5 S3 ]* T1 V @.Destination :=
1 x3 l. d( d7 U5 H' g+ }% [+ f rgManager.nearestFreeStation(@,track.~);/ E- V8 f* N, M$ ^4 `" f; N! _
newDirection(@);
/ [% ]6 j' n- W, H% j x if @.Destination /= void then
9 H* c, w! c1 i2 s @.Destination.NumReservation :=% _* D- P# S7 U/ P P: }
@.Destination.NumReservation + 1;
8 s S. s; z+ J9 Z) y9 X end;
" S3 q F4 D4 {# ?% w$ C( Z @.CurrIcon := "drivingHome";
6 A5 \8 U9 B8 B5 l% c: w @.DrivingHome := true;
3 a- r7 r7 H$ N" ]$ a0 I! W end;
8 w- N5 ~; w# Z9 v8 s) b% b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ |. n) q' P% L: u( B! Z part := @.transpOrder;
M; h0 c8 l% f! _0 r7 h part.move(@);-- load part
* m5 B/ l4 Q$ U @.CurrIcon := "load";
5 Y7 i6 \1 Q# m7 a6 q; E1 Z GlobalDistObj := part.globDestination; ]& M7 X) S8 h9 I% R
assignLObj := rgmanager.rgAssignL;% j& k) q7 L' l! W( P
row := assignLObj.getRowNo(GlobalDistObj);
8 c: I/ @" }$ b* N if Row = -1 then -- since 70% e# m; @# w; L
if lan=1 then6 Y, m- ~! G8 R8 E6 A" H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- g, d, B3 x6 D to_str("in der Andockstation: \"",?.~.name,"\""));
! J( I7 K& Q- k4 g6 h else
+ ?4 N) l' T3 Z4 ?; Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 `) o' x2 d0 z4 i( s to_str("in docking station: \"",?.~.name,"\""));
! q- E Z: D6 i: D# g end;
5 r* V# \$ J5 K X- F+ y ?. ] else
; u5 e! N% [5 e! F7 _7 I @.Destination := assignLObj[1,row];, B5 e: S& J: v( X
end; * A# l8 h" l8 {0 d" B! H0 f
newDirection(@);9 [! o7 m: g* B9 `
@.HasOrder := true;
! _* y1 N0 G# `5 l) Z5 J ] end;
8 {" | }4 u% j* U P7 B/ q end;
8 d1 ]; `3 t& p2 S1 c* J/ s0 pend; -- of the method
/ b; r0 H6 l8 N% ?1 j |