/* called by: entrance ctrl of the object 'track'
( y0 E3 e& ~% n% o- r*/ j2 I. E7 I( X6 p7 ^, O" n
is
, u$ f1 a, o- N3 ~6 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;( D& ?: v5 L. i3 k4 ~0 u4 E, v
do
$ z+ y" D) n$ _5 {+ J Lan := rootfolder.Internal.Tools.AOLlanguage;% a( X5 v. Y5 A8 b! l1 Y" O ^8 C1 R3 H
if current = @.Destination -- else return. p; t1 T8 q6 i: { n
then3 B: c y# I- n2 `+ S& _( E: ]
@.Destination := void;: u" |' q: F1 K1 l" D. B( w
if @.occupied then
% c, N0 x: K7 y5 M" Q part := @.cont;1 q# j( Y" h+ k- g' Y
@.transpOrder := void;
x/ j/ u$ @( R) u) | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* T+ G* v+ L& W" F" Y2 ^ @,root.eventcontroller.simTime);" k6 X0 v% d. k; {& j Z# a
@.HasOrder := false;4 ~/ @ A1 P* }5 X
@.DrivingHome := true;
( F: T, w4 W' l. P& C rgManager.tryToStartTransOrder;/ x0 z$ u$ C" i! |0 W" h
if @.Destination = void8 X* E6 C2 l5 i1 Q9 l N2 V
then -- no transport order for vehicle @! G% k, Q7 m! e3 e
@.Destination :=
, m, _6 H- E, y/ ~: e" L } rgManager.nearestFreeStation(@,track.~);
& j, K8 s* d7 a5 f& L( x. q* c9 { newDirection(@);
/ j- d' f$ z: F; [% U3 z if @.Destination /= void then3 Y2 {+ c. a" X) R& Y; }# t3 {+ q
@.Destination.NumReservation :=0 w s3 }7 p1 P3 t: Q
@.Destination.NumReservation + 1;" s7 r; {: w( D: n F
end;
' G; _* ~0 z& K5 N @.CurrIcon := "drivingHome";/ x) R2 S$ |( C/ O' w
@.DrivingHome := true;8 i1 l2 V; t7 T0 v k2 Z- i3 M
end;
) L1 v, t5 P0 b+ r. _" A else -- the vehicle @ is empty, both vehicle and part are in the same dock station
b& D1 ]6 ^5 L' d2 x7 l2 |5 f, c part := @.transpOrder;% X `' z( e9 S
part.move(@);-- load part" C/ Y* ^$ R V1 t* r) m$ l) _
@.CurrIcon := "load";
) t; a* p h! |+ d2 j- b7 L" W, k GlobalDistObj := part.globDestination;
7 ^) {5 M$ x6 { R5 ]/ V assignLObj := rgmanager.rgAssignL;- o2 S! f- |3 s
row := assignLObj.getRowNo(GlobalDistObj);" ^* i0 q) N0 ]- b; a
if Row = -1 then -- since 70! q" @; w' k; O: Y
if lan=1 then
, m$ {* y% x9 x4 G0 |; l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. H% A6 X o& t1 G/ P, e5 h
to_str("in der Andockstation: \"",?.~.name,"\""));
5 A$ O% k) Q0 u8 A7 X- D else
2 N* h( [2 s' T/ ]# n7 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. T1 Z" q; B1 n% c5 j3 T to_str("in docking station: \"",?.~.name,"\""));
) a7 f9 A; ^( K1 x end;
* X: a$ }' ^+ z6 H+ Y# o else4 K, R5 G0 Y8 X6 e8 B, a
@.Destination := assignLObj[1,row];) i3 i( t( i5 D1 B+ }9 ^$ Q
end; + q9 n: W; y5 j
newDirection(@);
3 o& ~! x4 q, K4 w; F- q @.HasOrder := true;
. I# B% F7 y- s' r0 ~+ w) y2 g end;
$ E3 S' }: A% p0 G# J4 H* M, ] end;7 _* x1 ^) y) @( E
end; -- of the method
: H; E- F$ T5 |5 f! I ] |