/* called by: entrance ctrl of the object 'track'
( ?8 r. h% T# D*/8 Z$ Q, i: R) J3 w4 o
is! [: y& U. e1 x% v. F5 J2 m* G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- l3 O2 i' q2 j% o
do F% V/ B5 b2 p
Lan := rootfolder.Internal.Tools.AOLlanguage;9 W8 X( l" ~* {" k; P
if current = @.Destination -- else return
; H* @9 ^ k- a3 s! @2 l) L then0 d( u' w) ^% H3 q
@.Destination := void;% E. n2 e1 g6 F+ G( d8 y# G
if @.occupied then
! J2 S3 i' U7 k$ N7 S6 I* \8 Q; { part := @.cont;
1 A0 n! c: Q% j& j7 c/ u @.transpOrder := void;
) L0 N8 i2 b9 O; c+ G2 p; A9 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) q/ [7 v2 z* E8 F9 {- x
@,root.eventcontroller.simTime);& b" a0 ^% k7 O G( \6 X
@.HasOrder := false;0 `) [1 M- B2 s, {% i, I& C/ a
@.DrivingHome := true;
" o7 {$ V6 M* _3 a5 U rgManager.tryToStartTransOrder;- C, @! k- y3 @/ S9 o# C& n
if @.Destination = void
/ t. q5 b2 t T& h+ V. G then -- no transport order for vehicle @
, V) s0 F9 e( j: l+ a$ z @.Destination :=
# Q# r0 @; s' }7 m rgManager.nearestFreeStation(@,track.~);: P& A* m, }6 T+ o. G
newDirection(@); * o$ C7 I. @; a( v
if @.Destination /= void then. z" T* }/ {( X8 \
@.Destination.NumReservation :=1 p9 z" b7 b$ ?( s5 V
@.Destination.NumReservation + 1;
, n G/ ^+ a& K& w, j) S& G9 w8 Y end;7 D9 W, T0 h$ \6 L% [
@.CurrIcon := "drivingHome";$ s/ D$ v8 H' c6 j% [+ p1 {
@.DrivingHome := true;
" ~, s# A7 S4 N5 I3 M! W; z: } end;# W4 o" Z9 a. u: z. U6 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ _1 f) E( t6 u* e* o
part := @.transpOrder;' M' Y! T( u$ R
part.move(@);-- load part _1 r2 N4 L- X3 t3 _7 z" Y2 W
@.CurrIcon := "load";
. m& z [$ i. L& ]3 G GlobalDistObj := part.globDestination;# b& l% Z6 B9 H5 s
assignLObj := rgmanager.rgAssignL;2 d o" m8 r( U/ [- J* \* S6 |
row := assignLObj.getRowNo(GlobalDistObj);1 n$ Q, |" P% }7 |. U7 k7 N
if Row = -1 then -- since 70
0 s! o6 L( m i: B if lan=1 then( G: R- B/ z0 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# [* \, Q) q& G7 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
; C' N1 k/ c! b else
+ H' ^& n& W, O3 L! Z! R# D; p7 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," H. f8 [. M- N2 U' @: V/ z
to_str("in docking station: \"",?.~.name,"\""));
" Z# R6 F- ~: u8 C) b# q0 J end;
/ D* X, p& \, p2 F6 U. D else0 [9 v# `4 t" h4 ~
@.Destination := assignLObj[1,row];- ^! f/ g# _1 ?( `/ |$ Y; @# o, b" Z
end; + t5 N( X$ K ]$ \* m/ w
newDirection(@);
) C; r( A3 d' S, V5 s+ M" ?: i @.HasOrder := true;! d' u: l9 g( D8 ]4 l
end;9 s+ L) W5 [* {0 \$ ^/ e9 i1 ^5 J
end; J8 @' X( f1 w+ e# W! Y- C+ p Q
end; -- of the method
; V, [. {/ S: u9 ]7 r |