/* called by: entrance ctrl of the object 'track') [/ X" l: o- k8 | Q+ G
*/6 _( m3 ?! d4 [2 K: F: I7 [0 B
is8 ^9 X7 |2 M& P- a: w# ?6 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer; l0 \4 e0 C; i5 `2 c* l- J# B' y
do( z+ w4 T% V) V
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ X f6 _" l) S" B& i8 Q if current = @.Destination -- else return
3 t( [2 s0 r) F9 x then) k) i3 U& \7 m) z6 n7 C2 D+ e _
@.Destination := void;0 Y! r( t6 v" ?/ c2 L/ f5 |
if @.occupied then
/ m8 i3 w; g/ H part := @.cont;
* B3 U* `4 }1 Y, P @.transpOrder := void;
# e- y Q$ N @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 J3 c% s, c( W1 J; p
@,root.eventcontroller.simTime);
5 S4 L5 {3 P" ] @.HasOrder := false;# Q+ Q7 A9 d T( A$ y8 q& s. o/ ]
@.DrivingHome := true;3 [ Z0 k6 {. ]
rgManager.tryToStartTransOrder;% g! G2 d& t: w! `2 ]* A
if @.Destination = void4 H" v$ q- ]0 r
then -- no transport order for vehicle @" e! p0 T% i. o; {# j$ F, j
@.Destination :=
4 Y1 j0 ~+ M) n, X rgManager.nearestFreeStation(@,track.~);/ A* L% W/ N/ |2 v
newDirection(@);
; b; U) b; I+ j" B5 h. ^5 k: J if @.Destination /= void then
6 o& x/ i' b. c- f' j; T @.Destination.NumReservation :=
& q4 G2 M1 P, M( C @.Destination.NumReservation + 1;- I# C2 w8 F. U% c! S8 M# y
end;% G9 g& ]- K, s% b/ n
@.CurrIcon := "drivingHome";- g; _1 s) |, @* h' P5 p0 b3 Z/ l
@.DrivingHome := true;
0 K0 s$ x7 h9 L4 k/ E5 F1 e end;
" N8 \1 m' f4 v* b; V% G g) ^; N else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 h# `9 _5 B% P; i# V8 H/ I
part := @.transpOrder;
# D6 a+ m# l% x: C part.move(@);-- load part: K) B1 s0 W* j, F3 d7 q
@.CurrIcon := "load";* Z9 _, \& Z$ u% i
GlobalDistObj := part.globDestination;
5 c& ^. z2 D, D assignLObj := rgmanager.rgAssignL;7 F( N7 n: `& l! B' O2 n% i
row := assignLObj.getRowNo(GlobalDistObj);
8 ?% F0 S; z9 u- i- ], c if Row = -1 then -- since 70* i0 s+ h2 D; }1 e
if lan=1 then
3 e0 W; @, q6 l$ K+ \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 e- Q7 }) N5 p: i; D$ T, J+ i to_str("in der Andockstation: \"",?.~.name,"\""));
0 ?9 U3 ?6 k) p9 G) C: P else
2 w% ] c8 S4 T8 ^7 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 J8 R; N+ U6 k" U. m9 a: W5 @! u* B to_str("in docking station: \"",?.~.name,"\"")); * r$ c6 F0 Q, r6 B0 M
end;
- {! e5 _$ i: L# g4 G8 V0 K else9 [3 k; _- a' |. c
@.Destination := assignLObj[1,row];
& ?# \1 `9 r# \: B0 e: o end;
" i8 C7 N1 S& i6 k8 {6 z! J newDirection(@);
- J' t9 R9 w" k0 I' m- f; V( {" B8 E @.HasOrder := true;
" i8 B0 J E, W9 H$ w- } end;
4 {# ^, r& o0 N: Z end; s t7 k: V& E' B
end; -- of the method
1 g; R5 s+ J2 D6 o3 u( F( |4 Y2 E! t |