/* called by: entrance ctrl of the object 'track'
% h+ P$ @! L, l ~% p. @*/& k7 \# T8 e p0 \4 q
is8 a: b; T: E8 {! W% C' [2 l* s' C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ?' s. f5 p, m# Q, |/ ?) }% Pdo
c8 x. Q ?; `2 y+ d3 z$ s; a Lan := rootfolder.Internal.Tools.AOLlanguage;
8 I9 g5 V: M) l if current = @.Destination -- else return! R/ i9 U# l7 ^
then: Q, K N. m1 Y+ ]
@.Destination := void;' O$ E/ J; ]6 f Q4 N( {
if @.occupied then1 y& `$ `0 T' `1 b5 T
part := @.cont;# v! E" Y+ Y( g# ~( Z) |1 Y9 _
@.transpOrder := void;
, r6 ~+ z2 g: F4 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" B. }9 O/ s9 |* N: P0 N; E* J @,root.eventcontroller.simTime);. Q. c* k3 N2 K: Y
@.HasOrder := false;7 g8 e `* _- u9 u: f
@.DrivingHome := true;4 g9 T2 o) s# s! P5 x9 W
rgManager.tryToStartTransOrder;
: ^0 \. I5 t0 ? if @.Destination = void/ ^' t. ?- |! h# `. B4 ]1 `5 t
then -- no transport order for vehicle @
4 L2 {) T+ J' U' } @.Destination :=- d( B3 U8 R5 i3 b
rgManager.nearestFreeStation(@,track.~);
% }/ W G8 |) k' y* d* l6 a" t8 z newDirection(@); 6 c9 O. P7 g' h% a$ m: h# o8 u
if @.Destination /= void then
+ v1 ?4 i- F" F$ o @.Destination.NumReservation :=
7 @! H6 t# z( z7 q- R8 B) Q @.Destination.NumReservation + 1;* L5 S' }8 |! j* h7 b4 O
end;7 t' t- }; T* K1 J
@.CurrIcon := "drivingHome";- b- R, @# B; a0 h
@.DrivingHome := true;' m/ J0 ^ O% K, ~4 L
end;% i, H: q' \7 h+ |# a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* Z8 D9 C" ?" P' P7 j+ Z part := @.transpOrder;
$ g% R/ n' `( o8 u" O1 X4 j- F part.move(@);-- load part( i/ H: ?8 ?$ ^6 Q
@.CurrIcon := "load";
& z% O9 n9 z: B9 C% B& C, V- Y GlobalDistObj := part.globDestination;) J9 V' `' M& m! O4 m. q4 c
assignLObj := rgmanager.rgAssignL;
2 d9 C: X$ e) T+ }. I row := assignLObj.getRowNo(GlobalDistObj);& Q7 z/ k7 V8 v" {, S
if Row = -1 then -- since 705 ^+ e; J7 g$ X) z2 o
if lan=1 then
1 t9 K$ t+ Z8 f6 {' y8 j9 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- T3 l! P. m$ p# I/ Y+ ? to_str("in der Andockstation: \"",?.~.name,"\""));
) G% l" @9 H3 b; D else' T: _0 m0 A2 z8 E# a$ ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- w& V0 w+ V( g) k. z/ Q' G6 M to_str("in docking station: \"",?.~.name,"\""));
' N y1 _9 x8 O end;
$ D5 _9 N; Y% p else9 E# ?+ R6 J9 \
@.Destination := assignLObj[1,row];
6 v5 j. I# e& @3 p1 ~" l K- f end; 0 E$ O# z* e& ]7 A9 g( \
newDirection(@);
, x( b( j6 F5 c: g @.HasOrder := true;2 B# r; F; H G+ u8 h# L( ] I
end;
* n7 Z3 ~$ J+ t, J) e8 h' f end;
6 C: `7 d8 \8 x0 Q% K( C/ @end; -- of the method
) Z: D' t) }# F2 E* O( [ |