/* called by: entrance ctrl of the object 'track'6 _6 g: c. c, T3 }
*/
) H1 {3 W( p8 ~4 j& Cis
6 l P4 A- z n. _3 l! N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 }/ U4 ]. M$ i0 L+ ddo
; ?9 U2 ^0 G. s& r0 v( d Lan := rootfolder.Internal.Tools.AOLlanguage;7 Y( L9 P$ ~ ^. x$ V. V4 s& D
if current = @.Destination -- else return6 A( N. k; T+ h7 q" s
then6 v- P4 R& q1 {8 B( w# ~0 f
@.Destination := void;
5 p {2 _9 [$ r4 `1 ` if @.occupied then! ? v! X" V( M+ i, @ l# u1 s
part := @.cont;! w1 N: h$ i4 N" t/ F
@.transpOrder := void;9 x! e; W7 }! g S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* H. V' M: j' h5 g; z @,root.eventcontroller.simTime);' N: M* J2 e# ]; M, u. N( y" w9 {
@.HasOrder := false;' [& n. a; n. p: F
@.DrivingHome := true;
" o) }+ @8 }3 h rgManager.tryToStartTransOrder;
! c$ E& G- M7 h8 E9 J: y5 f$ M. ]* n if @.Destination = void
$ C% H! x2 T+ D1 N5 D3 b then -- no transport order for vehicle @5 R; R; ^. J# W$ O4 {# G, S
@.Destination :=
! G3 K; n4 H5 a6 t4 v rgManager.nearestFreeStation(@,track.~);
- c3 S9 A8 }$ ~ t N newDirection(@); ! U- l; e& }) o0 X7 D, U6 }
if @.Destination /= void then3 H8 N3 ~7 {3 d1 G, ~: a( t
@.Destination.NumReservation :=
: X# H( ~7 w; }8 E1 g @.Destination.NumReservation + 1;5 `6 E1 B& }! \9 H. o& s
end;( Y8 ~% K) }; P w+ y9 _
@.CurrIcon := "drivingHome";8 N) k+ G6 y2 O) E( U( i
@.DrivingHome := true;
, W1 N, p# E b9 h) t( q6 W end;& D) S1 g4 b. Z9 R9 G% e/ P/ L( K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- D( o6 \& [- C/ p# E9 V part := @.transpOrder;) H4 f# ]$ y9 t/ c% w
part.move(@);-- load part R5 ^) B6 g' @' R& h2 F" m" }
@.CurrIcon := "load";" O# a5 Y; _0 w U/ k+ ]- o
GlobalDistObj := part.globDestination;# B1 \+ n+ H6 S T3 d
assignLObj := rgmanager.rgAssignL;
6 ]! @! }* R; N# A; P row := assignLObj.getRowNo(GlobalDistObj);( T2 P# M3 |5 s6 G
if Row = -1 then -- since 707 C! S6 L/ d( g( v; d9 Q( t
if lan=1 then
2 p3 B3 Z& M4 {4 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# j( H; J4 x/ J3 U7 S* G to_str("in der Andockstation: \"",?.~.name,"\""));7 n$ q; X! R& o7 a8 r
else
! w4 M I' c3 j3 V) v7 ~$ _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 q# u4 V W3 I. g! ~7 v
to_str("in docking station: \"",?.~.name,"\"")); 7 A! n7 C# A+ W/ ^( q
end;
6 A: B. z1 L& m& n5 d2 O) f" G) y/ r" q else
/ Z' H8 M P* w4 J0 k/ d# c @.Destination := assignLObj[1,row];
" v6 `$ w b. a& u7 _4 q end;
$ D9 C" W" V* L. y" {8 {. t- T# I newDirection(@);. z; {% X2 ^. A }3 c% g
@.HasOrder := true;
1 o. @) ^4 _$ j: w* Q0 r6 E; I end;" y$ n: B% L4 ~; J& B7 s/ F
end;% B1 n5 C5 J- l8 l* @/ Y, w# j2 G
end; -- of the method
: O9 E; r: k1 W8 \ s+ @0 J# I |