/* called by: entrance ctrl of the object 'track'+ U* ?0 y( {3 T
*/" |$ |& c k) o$ p$ }- T
is! Y, K) Y) b0 d) ?" c6 M4 |$ Z& Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) S: M6 \9 U) m0 R9 v3 ndo
9 \. T/ d. z, Z4 z# c Lan := rootfolder.Internal.Tools.AOLlanguage;
& l6 z% E0 F( W5 l# ] v if current = @.Destination -- else return7 E `- d' j7 q$ S
then
1 @& E( ]: {1 M% Q4 c, K @.Destination := void;
# X8 r0 `9 x) Z0 P' A5 e6 ]: E if @.occupied then
; Z9 F5 e) y0 U2 B5 I# x+ F part := @.cont;3 O* p% z F9 z! g5 e7 c+ ~$ G1 f
@.transpOrder := void;
5 N0 k& m& w7 @5 ^8 K8 g* A2 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 y! \# x6 |" n: k7 V4 N2 y" t @,root.eventcontroller.simTime);% t" f8 T0 ^; z& D" T _2 W% D
@.HasOrder := false;! y6 _2 e9 Q" j6 e' I6 [2 Q! D
@.DrivingHome := true;
( [, h m- I( Z$ \' T, i. Z rgManager.tryToStartTransOrder;3 b0 r4 F% a: a/ w# t
if @.Destination = void4 N W* w" F7 C C! V
then -- no transport order for vehicle @3 o4 ~: a7 w2 r
@.Destination :=
6 G9 i1 J6 O+ m# | rgManager.nearestFreeStation(@,track.~);* d- k7 y( k D4 D3 F
newDirection(@);
$ {% }& q/ u% v8 Y! e if @.Destination /= void then
D' N. G( y6 i @.Destination.NumReservation :=) b. ? u- M/ a4 `7 a" h; u9 v0 b( i
@.Destination.NumReservation + 1;
9 f9 y; d4 E+ R4 y* n/ g5 z end;* M/ ~3 U2 ^% W2 Q* r6 L4 }& y
@.CurrIcon := "drivingHome";
+ t7 F2 R) d7 H$ Y7 ~7 h @.DrivingHome := true;. |7 z: i/ v3 A+ J
end;
) w! R& i4 r% N! J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 y0 j( w5 |+ H3 E7 y! o part := @.transpOrder;
; V3 R$ {. ^6 \& W1 r8 [ part.move(@);-- load part2 K& r5 v0 \& m6 M" ]
@.CurrIcon := "load";
2 H, L+ D0 P+ e* {/ U4 x/ k GlobalDistObj := part.globDestination;/ `( B0 R3 u8 g M7 V' u! y
assignLObj := rgmanager.rgAssignL;
3 S4 E( [( w2 I7 H row := assignLObj.getRowNo(GlobalDistObj);- ]) R8 K% c/ O
if Row = -1 then -- since 70
. N/ [& e# A5 O7 ]4 r if lan=1 then8 R) e; N& I: q/ s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 T8 n# W. G8 v& f
to_str("in der Andockstation: \"",?.~.name,"\""));
5 ]" @" f( C! `0 |8 U0 E F5 x else
5 j" }: R" X. [5 M- h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- j- @* {/ q& T u, q9 u! `. ? to_str("in docking station: \"",?.~.name,"\""));
/ l+ D& I* R/ Z* d end;& N4 N& C* Z6 c, r
else {/ v3 E0 j+ \
@.Destination := assignLObj[1,row];
, n G- Z# m5 ]. H% @( w" h1 R end;
' b- W! O9 J2 L0 q5 x r2 n8 k* j newDirection(@);: k, s8 e, L# M0 @1 ^1 O+ N6 Q& M) y3 }
@.HasOrder := true;6 }) c; m* E( \! c U1 z0 M9 e7 z
end;
$ m6 r- v$ Q& l; F2 `' j end;4 H# t! [6 n0 `. t
end; -- of the method
! s7 Z& }8 x+ V: b1 _, { q |