/* called by: entrance ctrl of the object 'track'( W7 \6 R2 q( @
*/ p2 p8 A# J' |9 I% \/ I8 J) r
is
& y. l. l2 c8 K& Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;% y8 {6 u: h* G. B* V
do! j3 b! n3 {& y4 a. Y. ~3 o
Lan := rootfolder.Internal.Tools.AOLlanguage;, \6 `1 ^5 Z8 W
if current = @.Destination -- else return
( u7 d! W( p$ R4 q. W b7 w5 k then
) U0 C/ E/ O+ Q5 `7 q- R3 B# k5 N @.Destination := void;
2 s. n# |" ?) R9 q! B) r5 y4 h: r* c if @.occupied then
4 Q9 w9 o- k! t: Y6 L$ f7 Z) o part := @.cont;0 o4 i- {3 n: W. r% }; q
@.transpOrder := void;) @& A: m6 P9 k+ H! M F5 a$ R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( [% Z" }2 T, f& t" O
@,root.eventcontroller.simTime);
! |! \( D6 [: X* O5 U; Z @.HasOrder := false;& s! ~$ i( S9 S% ~3 P- j! k1 E
@.DrivingHome := true;
, m6 r* `8 K# w" L: X. @+ Z rgManager.tryToStartTransOrder;
* |( k" D) Y1 F" N if @.Destination = void
9 ?8 `4 g8 U% l7 u2 S then -- no transport order for vehicle @" r% H6 g( i6 L k- M1 @: k( n7 ~( J
@.Destination :=
/ |6 x( K) U# x( a; \ f& _0 x* ] rgManager.nearestFreeStation(@,track.~);
6 A9 e) Z, J y- k/ Y newDirection(@); - E0 H1 q: T+ U m* x: m7 F T m* @
if @.Destination /= void then. L+ @% ?5 r: N) h4 h: t; _$ b
@.Destination.NumReservation :=$ j9 W s( ~6 @+ |7 Z' o$ ?5 f8 E
@.Destination.NumReservation + 1;/ I! | g5 i; l" B- T. J7 M
end;" y6 [4 B# ^# u2 ?# _
@.CurrIcon := "drivingHome";
+ ~( i" i' i# ~( z& F @.DrivingHome := true;
! X. A2 o n& c/ x" p) K' x; a E) i end;; H1 t4 v7 U- N) a# y& z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 W$ q- A; ~! O" c1 f, l, p
part := @.transpOrder;
* u. R( O! D1 N, w6 F part.move(@);-- load part
# Q4 D2 T) @+ S0 v$ F6 R. g- Q% ?: ] @.CurrIcon := "load";) w! k) D1 N2 ^
GlobalDistObj := part.globDestination;
6 Z6 J7 M. w; y( I( B assignLObj := rgmanager.rgAssignL;
% S* k* Y8 q, `' Q8 z( e row := assignLObj.getRowNo(GlobalDistObj); T2 {0 E$ k$ g
if Row = -1 then -- since 70
$ I; n5 Q' a1 f) y% l, ?& U5 D if lan=1 then
+ d* Q, t% s+ L, f4 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# j7 e! M! U* H5 Y$ A, R2 c4 I: B
to_str("in der Andockstation: \"",?.~.name,"\""));/ W x9 H& c' Q
else; F9 [: E ?# u# e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ n, c- L' F7 i to_str("in docking station: \"",?.~.name,"\"")); 0 S1 n$ a) V }0 u. ?
end;+ S% {" H, Z4 x0 _
else& \7 j3 E, S7 ^4 }, F" r0 H- d
@.Destination := assignLObj[1,row];! L8 \" y5 S+ S1 j; ?
end;
8 ~& O' i" i% b# o- g; O( w newDirection(@);
+ F, _' {) m1 m5 ` @.HasOrder := true;
) v& H9 q, ~( c+ ~/ f end;& O7 {* X5 g D2 K* }
end;
9 ?4 E; [' X4 Q n- U& G0 @9 B4 Fend; -- of the method
& h& b- w5 a' T9 ^! v" J |