/* called by: entrance ctrl of the object 'track', x" C4 y9 v y! @* _
*/3 Q/ v! P' j. O1 i* i' L
is& D; m7 q% T9 O( U2 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
g/ |% {' m6 k' k1 ldo
6 C. C3 J3 ^: H% W, w Lan := rootfolder.Internal.Tools.AOLlanguage;- D2 W- d: T7 a/ k0 _4 L( P
if current = @.Destination -- else return9 C) q! u' z0 ]+ p! g) }
then
* M$ `( {' T5 i: d' F @.Destination := void;8 d2 a$ h" h/ L2 U$ S/ [! b; u
if @.occupied then
- j8 P8 G. g1 v' B part := @.cont;
" m# J" R: q( \9 g7 N @.transpOrder := void;2 H, v0 |4 `5 ?: I3 K4 O6 W/ p3 _* Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 {5 O1 F* W" N4 `2 J9 }
@,root.eventcontroller.simTime);
6 r) S% w% `5 C# ^" j6 i @.HasOrder := false;0 z) ^) g' @& R2 R; q4 B7 J& L
@.DrivingHome := true;
3 Z) l; ]3 t# `% D rgManager.tryToStartTransOrder;- F9 L; F2 M, v) @% s9 K+ H4 ^
if @.Destination = void$ z3 O# b1 J+ X+ G
then -- no transport order for vehicle @8 |/ B! q0 a0 b) I$ n
@.Destination :=2 Q. @: P0 \# W1 L9 M! _
rgManager.nearestFreeStation(@,track.~);: [4 h+ M1 \2 c4 _1 S8 J: W* H
newDirection(@);
5 _* K* g7 W5 P: [# \% @ if @.Destination /= void then
2 P$ G- b( F, _. d7 Y @.Destination.NumReservation :=" _0 U+ I) a+ {
@.Destination.NumReservation + 1;
+ v0 f6 }' B' |0 P1 n9 A! ` end;
* ?) e' v2 Y' I6 Z% p. B @.CurrIcon := "drivingHome";
1 K0 Y; d- o: S" `- m @.DrivingHome := true;
* z. d$ K7 @9 J9 b5 f, q1 H end;4 J, V$ d, v6 h1 J! j) a2 ?1 X0 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ l2 ]3 B: e7 J4 l
part := @.transpOrder;" ^+ O6 P4 }: g6 |
part.move(@);-- load part/ T' [( t; g% s* B5 [3 q: e
@.CurrIcon := "load";: L2 h6 `' T0 ~* l$ z0 z% Y8 o" t7 ]
GlobalDistObj := part.globDestination;
& }# u, V( E3 l5 y* M% k6 |* I2 K assignLObj := rgmanager.rgAssignL;* D) e, E) N; G! |1 F) z" W7 {
row := assignLObj.getRowNo(GlobalDistObj);& Q7 D7 r9 u. G) q
if Row = -1 then -- since 70% F3 J) C2 p3 t! A
if lan=1 then
7 N- z9 p _- c9 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( g+ e1 @* J0 h( ^, Z9 G
to_str("in der Andockstation: \"",?.~.name,"\""));
9 W$ A3 T V/ \! u" X% v8 ~/ k \ else) i) L' y- n; A7 _$ V8 Z) o& R+ X: X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
{9 V ]4 t" h' u- c' Y, v to_str("in docking station: \"",?.~.name,"\"")); 7 b4 p& y9 B p- ~2 O& Z$ r* q. @
end;
/ k( {% H2 D5 v' m" o2 @) ~ else
( y R( j( Y* ]# x& S @.Destination := assignLObj[1,row];- m6 {, g3 v8 T1 Z8 E
end; # Q3 o: Y, F$ B! t- O: Q ^
newDirection(@);
4 J' b4 F/ W' Y- T8 r @.HasOrder := true;
) U6 t, ~9 U5 j end;
% X/ O8 r% E. d, _ end;2 H6 W2 o0 P, R* a( a: s' z: `
end; -- of the method* P+ L- N" o: S3 ~! j! `0 Z
|