/* called by: entrance ctrl of the object 'track'3 Q9 h3 e* s9 d/ D1 n
*/- }: s: z3 L! W; I3 E$ x
is
2 Y5 J8 g; e& v' D# {" u) Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 l8 a `9 P% m
do
" \% u2 g: V: S; }4 f Lan := rootfolder.Internal.Tools.AOLlanguage; u1 i( F) _2 ^2 B" w7 i9 M7 O( [
if current = @.Destination -- else return' m* t) @+ u9 o9 F; m/ Z( Y5 B! e
then
7 T+ [! k1 O8 f' I* n+ g @.Destination := void;: t6 g1 H2 g8 o; K3 M0 N
if @.occupied then; ?& H" g" w8 A" [3 I/ i1 I
part := @.cont;
2 j* a8 ?' i S; u' y6 W- W @.transpOrder := void;
9 d" i( \# K' w% u4 j% S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 w+ h! t7 i3 q' ~( T @,root.eventcontroller.simTime);
* Q% z0 p. F# F: B. C; f& D( Z @.HasOrder := false;5 q3 b, N; p- k0 w5 T
@.DrivingHome := true;
/ ]* M* s8 p; r9 K rgManager.tryToStartTransOrder;
: }) @7 L& R9 r) @- h5 H if @.Destination = void
- R5 L7 n% K4 [5 {1 J# \6 u+ ` then -- no transport order for vehicle @9 R" P" V3 Z, H4 a
@.Destination :=
, z) j" U8 L; v% i9 i- z rgManager.nearestFreeStation(@,track.~);
- o3 |+ C# _9 k4 K% M7 e4 x newDirection(@);
9 J* }0 F9 r" a$ e9 e% F" N. Q if @.Destination /= void then
2 e. M; v S1 k" h7 o @.Destination.NumReservation :=
' f* E' R3 `9 h3 R @.Destination.NumReservation + 1;
( I1 G& `) w$ s% k end;4 t @: P1 j7 M9 k" ~
@.CurrIcon := "drivingHome";
d! W7 T2 g3 ` @.DrivingHome := true;- U# W6 W! x# @) C
end;
- _: R ^/ f6 N( P& e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 L/ _3 w& g6 M9 n9 R- j% V; A- H part := @.transpOrder;; N; X' \( k# d# n
part.move(@);-- load part
4 y5 b6 G, p) S6 ]. e& b @.CurrIcon := "load";
5 Y6 @& k2 g: u, u( C' W GlobalDistObj := part.globDestination;
9 L' Z+ d; Z8 E. J7 v5 H assignLObj := rgmanager.rgAssignL;+ w: U9 S( s* r- e
row := assignLObj.getRowNo(GlobalDistObj);* k- _( O/ m0 c+ l' ]
if Row = -1 then -- since 70" R- ?1 }2 d" Q# V8 }2 D* R# |
if lan=1 then
2 g9 E& U' |* S- }4 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- `4 M d m9 `. F! E
to_str("in der Andockstation: \"",?.~.name,"\""));( h8 D# \2 t( s4 W* G8 t. H8 s$ c
else
/ J8 D \0 s* t: c0 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& Q6 W% N0 e% C4 i to_str("in docking station: \"",?.~.name,"\""));
9 o* _9 n9 A, a6 O# @( H end;. X4 A5 [8 c) V) T; \* |
else6 w; ~2 s) h8 W
@.Destination := assignLObj[1,row];
: J1 o5 A8 Y3 W3 _0 i end;
* j6 h. Z# S# u$ w! `3 O newDirection(@);
0 S% @2 g9 C$ |" C @.HasOrder := true;$ a6 J9 z1 r) P6 X) u e9 \
end; m7 A' N0 }; ^
end;
$ U, [7 k' A' D, \9 y; T" h7 Bend; -- of the method
& a z3 O" M0 ~+ O3 A |