/* called by: entrance ctrl of the object 'track') x G4 I# ~/ v' z# N' G# E/ a. R
*/) o+ f5 A3 s F" c- N: Q1 \
is, p: A) t, H, I$ P% |4 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 B8 l" B' V' v+ H
do
$ y& S8 Q* p1 q/ B! y8 X9 d I/ _4 W Lan := rootfolder.Internal.Tools.AOLlanguage;
0 j! f+ N# H+ { w: b if current = @.Destination -- else return c; s; d" U* R G) C9 v& ~
then
% @( J6 P e# z/ `+ |7 } @.Destination := void; Z' ~3 U" l) n5 V; T
if @.occupied then
# q6 g5 S0 ?: B: u% v part := @.cont;, ~) I4 f: P( f" |3 L b" A# a1 G A
@.transpOrder := void;
1 G) b+ j; A/ ^4 W0 [& } T. y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 V4 ~ K. K- J- S6 m8 Y
@,root.eventcontroller.simTime);
; S% F7 _: v# n( J/ @5 ~/ D3 z6 Y @.HasOrder := false;$ O1 N8 e' h; c
@.DrivingHome := true;6 f' N, Y# l; r; C4 \
rgManager.tryToStartTransOrder;
. r8 }0 l* r: N/ u7 E if @.Destination = void
N( k) m; K. d then -- no transport order for vehicle @
: `: q% _. q8 F& e# ~ @.Destination :=
* S, `3 [4 l) Q% F# Q, D( _ rgManager.nearestFreeStation(@,track.~);
: l+ l7 m7 L7 j% }9 U1 j; g newDirection(@); $ g$ H6 x( r/ J1 C, k
if @.Destination /= void then. s* C% y' M& o" F! J* h: W& R
@.Destination.NumReservation :=# E2 _% F* j0 \
@.Destination.NumReservation + 1;
& V) C" ?; k7 b6 p8 p end;
* _( k6 @. C) r0 e- C @.CurrIcon := "drivingHome";0 b6 H: `% t; F% ]5 g) P+ B
@.DrivingHome := true;
( K/ d) D; {( ]9 B end;% ?4 t; [# L0 ~ m; `) Q% E7 u( f. P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ~8 q+ D/ V/ A9 R. `9 G5 A" W" a
part := @.transpOrder;/ Z0 T) t7 }$ G, b
part.move(@);-- load part
0 p+ w; u/ k- _ a) }3 n4 k; [ @.CurrIcon := "load";; j+ K! Q1 J8 T+ e
GlobalDistObj := part.globDestination;
0 d% x3 b; G1 L2 `& N assignLObj := rgmanager.rgAssignL;
6 T2 W; t9 K, |5 A g) Y/ ?7 U2 J row := assignLObj.getRowNo(GlobalDistObj);: r j6 g7 T9 W* z: f
if Row = -1 then -- since 70; z6 `9 W; t. y
if lan=1 then. U8 Z( K/ Z: _7 V( ~8 E5 a5 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( N+ R3 n: u% E- w to_str("in der Andockstation: \"",?.~.name,"\""));
4 s4 ]7 J* {- X3 v$ k9 U else
4 r7 v$ ^; ?# |8 M! v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& C% O6 M7 e ` y
to_str("in docking station: \"",?.~.name,"\""));
6 D' M/ X; s" G$ q2 k end;1 n$ ]; h8 K$ U# [
else
" N/ h$ M+ L4 \6 g) z @.Destination := assignLObj[1,row];
9 K( i' M6 b' k/ c" ^ end; - G% G/ Q% h" h# R+ x/ k" `6 y1 y
newDirection(@);8 a7 l& y- b! G4 P
@.HasOrder := true;
; X. M, s, s& w& ^8 m- `* X end;
. \& { X9 m7 Z end;+ w: ~. p3 |' J) _
end; -- of the method
7 l0 o( r8 G9 V6 ~ |