/* called by: entrance ctrl of the object 'track'
, r' p" M0 d$ _& I9 h, r*/1 e( f f9 [. d" `& n9 W8 t6 @
is5 A& H6 u, `) y8 @# N- R9 E. T8 I/ z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% L- O- i2 D( ^: K, Q6 R) f: Pdo
% a* U1 U/ k/ z3 @ Lan := rootfolder.Internal.Tools.AOLlanguage;* i* n, m/ I7 Z* J
if current = @.Destination -- else return6 g+ l. s& @1 C+ e D" `
then
4 z8 s. F" r/ i7 K* L0 g @.Destination := void;
. `$ f; U+ b& W# o; B3 u if @.occupied then
5 L$ A' e x/ u9 E) c9 W# [ part := @.cont;6 I+ g3 e' W$ l9 F
@.transpOrder := void;
m( S7 t9 K- h$ H! a: u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 e! u- q& n9 g' W2 u
@,root.eventcontroller.simTime);1 i4 y1 q7 m" c% W* G
@.HasOrder := false;$ F) e/ i$ _) C: k; g
@.DrivingHome := true;0 ?" O- P1 B l& k
rgManager.tryToStartTransOrder;
* d6 S1 [+ B: q; s6 H if @.Destination = void/ A# b2 h+ D% N
then -- no transport order for vehicle @" v C3 P% W7 A1 e" P/ y
@.Destination :=
' |% K, S: |9 n. m* \ rgManager.nearestFreeStation(@,track.~);( T8 [* O: y4 @
newDirection(@);
' k9 q& C n) V" ^* B if @.Destination /= void then
# X1 t, J% t0 ` f; h @.Destination.NumReservation := q( M$ O5 j" [
@.Destination.NumReservation + 1;
2 v! t5 D" n7 W end;
, T; U4 b f$ y$ n4 x! Z @.CurrIcon := "drivingHome";
/ i, w8 r* D9 t. D8 G @.DrivingHome := true;
: f& I% u: k& O7 @; p! C' X( Y x end;
" J6 j2 f9 c* I; C+ C% E4 W, D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& b1 D$ n: H7 p3 i part := @.transpOrder;0 w+ L2 h2 ?" \ O
part.move(@);-- load part
( i- s# G' v) z$ I3 s! w/ C @.CurrIcon := "load";8 D& v3 Y+ t) @2 i& R& ]
GlobalDistObj := part.globDestination;8 O/ G$ q7 e& d! o
assignLObj := rgmanager.rgAssignL;- |- W& q& M) k( ?& W: S6 N
row := assignLObj.getRowNo(GlobalDistObj);
. {4 \6 |6 u8 F/ x. x+ k if Row = -1 then -- since 701 r: a% r N8 |/ s" L
if lan=1 then
/ ?+ q! o; _" M7 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' W4 @( W: i% N9 r' I
to_str("in der Andockstation: \"",?.~.name,"\""));; \( i# Q7 Q" m6 r5 W! l
else
$ r6 ?" o# ^5 T) p' H7 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ [/ |' p+ P& m4 g to_str("in docking station: \"",?.~.name,"\""));
6 G, s# D. Z, e0 w+ c8 ^* V; v end;
( W& Q0 P# r+ ]. U* I% H3 g else7 w: C& }; M+ `- u
@.Destination := assignLObj[1,row];
# u) Z) T% D0 m end; - N5 u2 d5 H, N9 r2 U& S
newDirection(@);/ [3 i$ y9 v% n! z
@.HasOrder := true;9 w; R- m/ c5 P- E z
end;
; {8 K* i. L5 i6 x; g! f3 i3 N% q end;% H1 [: |) V ?: t, `6 G2 _
end; -- of the method
: S* i4 s7 |- y' |+ f |