/* called by: entrance ctrl of the object 'track'
4 E( M$ _5 W; U5 g*/
1 O8 o: M) T) p: d. ^# R# Sis
9 D8 ]" p& u( q2 o9 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 E. o, ?1 {+ G* G3 L" l# U) g" Q
do
/ |: b$ R0 B2 j Lan := rootfolder.Internal.Tools.AOLlanguage;
& ]$ a) H0 T& X, D7 ^# ~; E if current = @.Destination -- else return1 v6 F7 U8 R: l3 S) J9 x) L
then% Q4 o: o$ z5 m; \8 M
@.Destination := void;( }" @+ Z$ [5 B* \
if @.occupied then
$ j# ]% c, L7 F- o part := @.cont;
( u) \% Y, J" } @.transpOrder := void;* R: ]4 g! g) H2 j" f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( _/ P1 }' d5 _* T& |7 r
@,root.eventcontroller.simTime);
& Y2 c5 r) i: `# s" Z @.HasOrder := false;
0 ^! n/ X0 q8 ^& {3 I) Q @.DrivingHome := true;! q' V0 n' i5 P( p# ^
rgManager.tryToStartTransOrder;3 i) a* p5 u3 S# y
if @.Destination = void
9 X5 [9 U7 X2 Z% L7 t: G# O then -- no transport order for vehicle @/ I0 M/ G) X# M+ L, P
@.Destination :=
& ^# p7 j0 x. {; u% R+ e: G rgManager.nearestFreeStation(@,track.~);
; y1 U' G8 ^) `- M5 ?/ l newDirection(@); 8 V& A+ S1 D! j; F7 Y& ~
if @.Destination /= void then7 ?. j% D0 ~( T% e. j$ b) h
@.Destination.NumReservation :=
2 ~. Z$ ]- G+ d5 S1 F( \( {! B @.Destination.NumReservation + 1;' Q% m$ z6 e" x& V7 }9 w
end;; ?# p, ^5 C% v, x
@.CurrIcon := "drivingHome";
5 Q# l1 _- [/ f5 G' \* N5 W2 j @.DrivingHome := true;
- I5 k! s! x7 R5 ?. ^% a/ s, B end;( y: O s8 y, X% ~$ L2 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 K: W4 L- U# L: ? part := @.transpOrder;
) j) Y( d5 K( e# R9 \/ i$ n2 Y part.move(@);-- load part i, F! j( U' _. v& t
@.CurrIcon := "load";
) o7 b& [' ~1 B! m GlobalDistObj := part.globDestination;$ ]9 H8 U" @8 ?: \" y; i- `
assignLObj := rgmanager.rgAssignL;
, W5 R/ i/ N! u S+ w1 V/ E row := assignLObj.getRowNo(GlobalDistObj);
4 p$ ~+ h7 ^! x4 H' r4 r if Row = -1 then -- since 70& m. b: J" S& A7 g
if lan=1 then) R/ B& S. q0 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% a+ I9 ]" k4 _7 F. {7 G( s& K to_str("in der Andockstation: \"",?.~.name,"\""));
1 S. F" ?7 A# D" \2 k! ^/ r else" c9 B! C+ v: l) J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& ^: i, C3 ? B7 g4 Z7 D0 j# E to_str("in docking station: \"",?.~.name,"\"")); " @4 A, w D3 N9 Y/ }% T
end;
$ h% m$ O* F% P: s) H else# i& Z6 D7 s$ R
@.Destination := assignLObj[1,row];; i& v1 ~0 W, a3 k6 f
end; 0 P1 B1 Z2 [! Z: G/ ^) K% {
newDirection(@);
# M- \: e5 `, n: \) z# o9 f @.HasOrder := true;. C. A' V8 R3 h
end;
9 I( K9 v+ L2 y, M5 U+ | end;
# P0 `$ o7 w9 Z, {end; -- of the method$ U! N) E% v, w3 S( a
|