/* called by: entrance ctrl of the object 'track'
' `9 j% q h& n; H a$ Q4 w5 o*/2 ]( I$ P, `6 B; }$ `. m+ ]
is
! i# R3 p: C. N part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 S; Z t+ \7 c8 {# o; x; g4 l( t7 x
do+ u7 s! y' u) H7 ]4 A0 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 c( p6 t- B' V3 G0 O P! Z if current = @.Destination -- else return! T- L0 t2 W% w; V8 V/ j
then0 P# W+ x, ?0 o, R J+ H6 |3 h P
@.Destination := void;5 w1 E! }4 ~+ N& k9 O# F
if @.occupied then0 \4 ~, }! G$ h" t/ e# Z
part := @.cont;# W) h, }3 H* d0 I
@.transpOrder := void;
9 ?% [" h& K$ y) Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, C0 N% }7 H+ z( i0 `, ^
@,root.eventcontroller.simTime);
! h) H9 S, w' Q' i% Z @.HasOrder := false;: t( q6 r+ z2 z0 s! _0 a
@.DrivingHome := true;5 R7 d" Y" c7 B+ q: X& j0 K
rgManager.tryToStartTransOrder;
) C: K* H+ d* {3 } if @.Destination = void
0 J$ m. X" l! a1 r then -- no transport order for vehicle @! w" v( s5 u% l0 v0 [& J. S1 M
@.Destination :=# [. O! L, H6 T) U0 A* ^8 f& M
rgManager.nearestFreeStation(@,track.~);7 @! m1 G6 q# y1 q! ^
newDirection(@);
. f Y6 x3 Q% I% v+ _ if @.Destination /= void then
. U# Z) S6 m+ c6 |2 H$ b, v @.Destination.NumReservation :=
8 f( D+ q. j c: \5 W @.Destination.NumReservation + 1;
" V2 j# N0 H5 ` end;$ n, z' @* I8 A: x
@.CurrIcon := "drivingHome";: s/ O6 l( y. K }0 B+ _$ N% n
@.DrivingHome := true;) V2 ^' c6 {3 {/ j* q
end;- V: D' U' U& e" j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. F" P4 j/ Q! L part := @.transpOrder;- E7 H4 f) c$ f7 W6 _8 j
part.move(@);-- load part5 O. F: H* ?, r: z ~- ~& k7 C
@.CurrIcon := "load";
) N# w/ |' l# m; |0 F* y GlobalDistObj := part.globDestination;
7 F K) c" X1 u: g0 d0 `* g assignLObj := rgmanager.rgAssignL; `. V' F- M3 s/ I8 Z3 t
row := assignLObj.getRowNo(GlobalDistObj);+ m; v' w/ Z7 a( v" L" S. R
if Row = -1 then -- since 707 W7 r# ~5 C3 ^
if lan=1 then
8 X$ r2 Y+ B0 a' _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# _# n0 X1 w9 s8 J) I0 ]2 } to_str("in der Andockstation: \"",?.~.name,"\""));3 j9 ]5 H1 d3 `3 ]0 y
else/ C5 q6 U8 B5 o3 d, ~4 {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 U! R& X0 d8 u, h, M) @
to_str("in docking station: \"",?.~.name,"\""));
3 u1 T/ F# N7 U0 O- I3 a( c end;
+ ]8 t- K& m8 {2 f" [( l4 J else! h; Y! j# I1 j5 {( M
@.Destination := assignLObj[1,row];
* h% B8 ^0 u' v; V2 z3 f end; 0 c* i7 T* E- [3 f" R
newDirection(@);9 i6 Q% X' Z& z, {, w
@.HasOrder := true;1 Q9 }+ {8 G+ z8 N; X q6 r7 t7 R
end;( t2 N- H, @4 s `; ^: n9 n, \
end;4 D3 q6 L u3 n+ C
end; -- of the method
2 O; d$ }$ B8 H' z7 k- l |