/* called by: entrance ctrl of the object 'track'7 {" @( b0 o: W/ J4 n4 I. w
*/5 ~3 F5 X9 e- O
is
7 g1 Q& y! Y6 O! b* N+ Y4 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 r" Q- B+ W( I ]5 ]6 G
do
& O! D' w. T0 K4 ?9 F Lan := rootfolder.Internal.Tools.AOLlanguage;4 \: E4 o. G* q+ `5 o1 _! Y, \4 u3 p
if current = @.Destination -- else return1 d/ x, f; S. O1 T; C$ i
then
0 I) R3 Q b( q: L3 ^, \. @ @.Destination := void;$ O- i9 ?/ y& S
if @.occupied then' C, t& S6 e8 R6 [8 v! _9 ?, F* v5 f% ~: Z
part := @.cont;
6 @) R: p! s* K4 ] d- e) G T @.transpOrder := void;
: X2 s9 v, B1 ~; z( H( ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% ~2 F" Q. q* g# r @,root.eventcontroller.simTime);
' U% I7 s# ^% c- z @.HasOrder := false;, a* X1 k5 c3 g' d+ U5 W
@.DrivingHome := true;! l- x# k! J6 d3 ^. w
rgManager.tryToStartTransOrder;# D: Z. y9 ?0 Y7 h: o( t3 r& o% P5 Q
if @.Destination = void# t7 Y. K1 ^: X# L& ]
then -- no transport order for vehicle @4 t# z* g3 }5 y$ ]
@.Destination :=
/ I7 j( `6 M3 A! s rgManager.nearestFreeStation(@,track.~);
% x2 I5 [/ C' {0 y, k newDirection(@);
9 k+ p7 M% e6 O* o1 x0 U if @.Destination /= void then8 l' G. Y" Y; N6 @: e
@.Destination.NumReservation :=; V6 }3 e# x; q# l" C( O% }
@.Destination.NumReservation + 1;+ b+ o) ?2 G+ Z6 f$ }# l
end;2 W2 |0 l% {" z
@.CurrIcon := "drivingHome";& Q2 s$ A. C3 l0 W0 t
@.DrivingHome := true;9 C1 F+ |9 m7 m$ e8 |" }: v
end;
( [" l% T% E1 S7 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: @1 A+ J0 k5 u v. j, G1 A' m1 k part := @.transpOrder;
- ~3 }; y: m7 E% w. a% c8 ?. B: u part.move(@);-- load part
, ^3 E5 y. b. [; }# A @.CurrIcon := "load";# _/ z9 {% b( [& f
GlobalDistObj := part.globDestination;
* V9 N, `* |" v& ?( k assignLObj := rgmanager.rgAssignL;
3 z6 u8 F: e, v, Z row := assignLObj.getRowNo(GlobalDistObj);
0 A* G" |3 W) W) _0 P if Row = -1 then -- since 70 a; s9 m! y6 V0 C: y5 V
if lan=1 then. B k+ G5 i2 g2 n" K# n$ f; i: l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 Z e' ~$ W: o0 I- s& t# P' x% F to_str("in der Andockstation: \"",?.~.name,"\""));
7 P* ?5 n' f- }9 Z6 d' r else- j+ h; Z9 V! x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% \. z3 O9 e4 {1 w/ `# W: g! G to_str("in docking station: \"",?.~.name,"\""));
' s6 z+ W4 }( L/ q1 }) b' m2 m end;
$ B) T8 l5 ^3 ^& @7 r else
; k! g* d4 t- z) v+ U) H. [ T @.Destination := assignLObj[1,row];7 c- [. _0 C: K& g2 Q% T5 ]
end; 7 \& Z) g O4 X5 w
newDirection(@);
, v8 ?& X$ M0 F9 `' t5 w8 _3 x @.HasOrder := true;' |0 t, ^7 B1 e
end;0 v- u% g( D, p9 G
end;
2 @2 X8 H# Z$ A: R# iend; -- of the method+ e) O" ?) @# l
|