/* called by: entrance ctrl of the object 'track'* n/ f0 s9 N) m5 k3 f2 p
*/: P5 V* X7 V0 d8 @& x& }
is
3 h9 o& M( |/ {% y0 R5 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& t! m4 n+ P! Udo8 d3 L! V% I9 j+ b5 `
Lan := rootfolder.Internal.Tools.AOLlanguage;9 r- R; {9 g/ t5 d; E. H. A* ?# m
if current = @.Destination -- else return
& `' d2 C" B" ^8 Y$ a/ X( V then5 g9 E3 i. J! `
@.Destination := void;& X2 s: T. ^0 X2 p! f, C$ t
if @.occupied then
- ?9 k( R3 e$ K" K part := @.cont;) Z9 R( V. G3 l3 u. c9 X! Q& a! I
@.transpOrder := void;7 |; R! t, Y1 F. E) r! O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 j% o! H7 F! b& z @0 u+ Z) J; L1 J
@,root.eventcontroller.simTime);
c$ G' J! d7 b& C+ H" }+ }6 `6 G b @.HasOrder := false;6 E* B, |7 U- O! S7 ~
@.DrivingHome := true;
; y" i( G7 C( U3 B, d rgManager.tryToStartTransOrder;
% J! p! o9 x8 N6 w* [+ U if @.Destination = void
" T- n- c: M3 j, x then -- no transport order for vehicle @4 e0 _* p. ?0 l* \
@.Destination :=
! ~7 A% O- {9 w8 a' J rgManager.nearestFreeStation(@,track.~);7 w% _$ x+ U6 ~3 M8 Q
newDirection(@); ( D* ?( Y# u2 p; ?& v+ b9 U0 S
if @.Destination /= void then
% {! E; X8 g5 r# M+ x @.Destination.NumReservation :=
! ^& P6 c8 _( m4 c9 F$ [2 U5 z @.Destination.NumReservation + 1;4 s5 D$ } g0 C) m3 a
end;
4 D, l$ j# F C, R0 ^6 r @.CurrIcon := "drivingHome";
2 g+ B5 _5 Y* q8 ^7 \9 H2 _& D @.DrivingHome := true;
- v1 @4 i! U, k j2 c4 g# w end;
0 @) g& q) C' J else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 F; U/ W: n" h* L7 A4 e
part := @.transpOrder;. K+ M ?$ H- E. Y4 u* k- e" z
part.move(@);-- load part: `) D& V3 ~* I! x$ a, Y, N% a4 O
@.CurrIcon := "load";
1 `. P5 c7 n. r9 m I! B GlobalDistObj := part.globDestination;
: M, B' d. B9 S% u assignLObj := rgmanager.rgAssignL;# n/ C: |+ }( o( r' h( s
row := assignLObj.getRowNo(GlobalDistObj);
- v1 D1 J* @1 r- R if Row = -1 then -- since 70
: j. ]! }% u& @! G9 A. _ R if lan=1 then
0 m0 h2 C. x' c& X4 c t/ j# O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! y& e! }7 E# o9 X to_str("in der Andockstation: \"",?.~.name,"\""));
7 m6 r* _6 [- {3 O0 ^0 g, T else
?' h; q( \1 R( P5 Y+ @, R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 W- e \ @5 H- l8 g3 d
to_str("in docking station: \"",?.~.name,"\""));
; S# Y- l& `, g8 l, G$ v3 D6 D end;
! q: s- v" n; L3 [4 w else: S) G$ S6 O* u2 D* S
@.Destination := assignLObj[1,row];& |7 }9 D1 Z' k& k" z' U; E4 j2 w
end; : x8 z' e; C0 a, b3 b1 L+ j
newDirection(@);
: T% j: E8 `) I; n6 ?4 r+ Q4 { @.HasOrder := true;" k/ I0 ]: B+ L% B" f- ?7 J9 \
end;8 K6 x7 h8 b7 K
end;& x) B( f& p2 R. s7 H$ J
end; -- of the method
7 E) P9 A- [- Y9 Q/ i2 h |