/* called by: entrance ctrl of the object 'track': U4 G( v# K& @8 l; U+ Q
*/9 d8 P- E, }$ ` M* S, V$ p
is
2 o) @0 `" U& o4 j( B' ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# p: O! e* z- E7 y w. Edo8 L7 o: P0 c- c+ K
Lan := rootfolder.Internal.Tools.AOLlanguage;
. |) G) Q0 M) f1 t) @" I if current = @.Destination -- else return$ b& g! x& s7 {& C. v, ?
then
; J" B7 F8 p9 F# t; R. O @.Destination := void; O9 z0 q. J6 Y( i6 m" u
if @.occupied then
) P8 ?) Y! {6 t0 J: K: H part := @.cont;5 Q9 ]- A0 @7 _3 w
@.transpOrder := void;8 M9 `6 A7 c7 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: S0 f @4 ?9 O @,root.eventcontroller.simTime);& @4 J/ I6 U5 E! C" w! I
@.HasOrder := false;
) ]/ H) F5 x! R5 L* x @.DrivingHome := true;5 u) S: h6 }: M9 V
rgManager.tryToStartTransOrder;
- U; ?. p- d. L+ s if @.Destination = void
- J4 ] ]3 U, `& [5 P then -- no transport order for vehicle @
2 W* }9 W; R. X8 r$ _& b0 A @.Destination :=4 {6 d+ ]1 ^; H1 A$ F( V
rgManager.nearestFreeStation(@,track.~);% y9 l1 Z5 N0 `
newDirection(@); 9 v9 g- p/ h# K) q, m
if @.Destination /= void then
7 t2 i) F8 ?# I4 u @.Destination.NumReservation :=
6 T, I |/ t7 u" s @.Destination.NumReservation + 1;: n( n5 ?+ M9 G( e
end;% H' s! G% A6 j2 Q3 L/ K
@.CurrIcon := "drivingHome";1 j0 N& c( y1 @& r5 f' |
@.DrivingHome := true;6 u) N9 I' V( ^( b& r, v
end;5 [$ @/ E1 X8 r- J4 A9 H$ k+ a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 u5 ~1 R9 n$ s% ? part := @.transpOrder;
0 k0 w1 [ {- w' _! c" ?# J part.move(@);-- load part
6 ]& m% W0 U1 F" i# F @.CurrIcon := "load";
0 `* U; d. m G, Y GlobalDistObj := part.globDestination;! E" M1 R5 K0 F, x" ~; B
assignLObj := rgmanager.rgAssignL;& Z v8 M2 I: e! o* @
row := assignLObj.getRowNo(GlobalDistObj);6 I5 Q8 w. p0 g- {6 h& c, A$ [# t
if Row = -1 then -- since 70 m% X/ C3 V* x0 g. p7 A
if lan=1 then
6 O6 h9 K$ {& o9 U6 D6 n# R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 {- I' S6 Q$ X& z: ^ to_str("in der Andockstation: \"",?.~.name,"\""));
: Q8 V# q/ D: w* `3 |9 Q5 n else
0 t) g9 F- D& _3 ]' t3 I0 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% f. A( L% `( C7 ~) N# u0 x to_str("in docking station: \"",?.~.name,"\"")); # Q$ j$ z2 Y5 s g6 g5 X% F; Y
end;
9 ^# `3 W" d) h2 H1 w0 {) L else- ^# d9 B% O* i" b
@.Destination := assignLObj[1,row];% @7 H# i, g+ f2 V3 k
end;
# ~6 }, k* h5 ]; I% F4 P8 g newDirection(@);
! T b6 i, G; Q" f) `% F( j i @.HasOrder := true;1 p& E1 E2 h8 _/ r& @& Y0 i! \5 G5 O* n
end;. p$ d, l. g6 M3 U
end; E- C! z, y( C. l+ D& p
end; -- of the method
. I/ V- G6 _% U& ^( y* E |