/* called by: entrance ctrl of the object 'track'
5 M, }7 u F3 L& }; O1 q: Q, }# u*/
3 ~/ O6 R, j3 N# Gis9 n- V* G# v8 {1 i0 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 }' G' Q: v, o
do0 f% O+ r2 `" i) ]) A+ w1 ~3 V2 {4 U
Lan := rootfolder.Internal.Tools.AOLlanguage;/ U3 x# L* h; I1 w' S; I
if current = @.Destination -- else return
8 y- p& v7 N4 o8 Y: z/ `- S6 @ then. k% v4 N6 E2 W- v. G
@.Destination := void;: r' A: K7 E* F) b6 @
if @.occupied then
: F5 x, w0 m1 P, U) K& O. l part := @.cont;$ Y% |, A+ Z8 _1 ^' S# Q
@.transpOrder := void;9 V) C6 R, @/ b0 V6 Q) b' @; `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 q. a3 U/ g2 q9 S3 ]" C) w7 f7 l n @,root.eventcontroller.simTime);
* Y7 R$ V( `$ O3 S) c* ]) b @.HasOrder := false;. X5 R) ?! R( [6 F' }" ^
@.DrivingHome := true;
: O! N# R0 h+ g; H- V rgManager.tryToStartTransOrder;' x7 j3 D; J0 e
if @.Destination = void
+ A) e$ O/ e+ h) D; l/ n: X3 N; ^ then -- no transport order for vehicle @& e% ^8 O4 [1 Z/ j8 i
@.Destination :=
" J+ t* I* P- o$ w9 A8 P0 n rgManager.nearestFreeStation(@,track.~);2 M( ^: X; J0 H8 r, W1 v
newDirection(@);
$ I1 c! @! E) ?3 N9 h/ A) m+ z* l if @.Destination /= void then; o8 J n3 m9 Q& D4 A5 A
@.Destination.NumReservation :=2 u9 q! n8 ^% @4 c o( t& h. [
@.Destination.NumReservation + 1;
2 |: x& Y" ?3 L end;
! ~2 i& H1 a3 I+ a, w) f( b @.CurrIcon := "drivingHome";4 K7 M2 T9 b {- }2 T
@.DrivingHome := true;4 C& T! j. a; i0 k
end;
! Y! s, |4 \5 [. P9 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) K2 g% U+ j$ K) @ part := @.transpOrder;
' o! g, @: v% y- E+ P6 t part.move(@);-- load part- u+ j1 W5 q' D
@.CurrIcon := "load";
9 K' l T1 A+ z8 E1 w Q1 f GlobalDistObj := part.globDestination;
7 L6 `# D# R5 R# b, [. { assignLObj := rgmanager.rgAssignL;
& ~4 E8 N) H* V3 A8 t- \0 h5 t row := assignLObj.getRowNo(GlobalDistObj);
% X" h0 t% q& q2 G5 L& N6 q |2 V i if Row = -1 then -- since 70
& E* ]! `+ B7 T, ?0 ] if lan=1 then
: R% {0 u- Y2 N0 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. F6 J9 d& a" l1 Z8 K to_str("in der Andockstation: \"",?.~.name,"\""));$ \( e% |# d/ C$ m7 l& Z
else
. R9 [* w! x m1 x# ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g3 D- n- x% d5 A% C
to_str("in docking station: \"",?.~.name,"\""));
) f7 G4 H1 l( s end;) Y- b$ H0 b; j% }$ |9 x
else
[( H. ~" f y6 H# }) }( P* d @ @.Destination := assignLObj[1,row];
2 N x. S- R; E6 g h& j i end; # G9 X; Y; D" B( \! S* U" V
newDirection(@);/ c& O! |3 o7 h7 F' _$ P1 @/ z
@.HasOrder := true;" T5 ^2 h0 W0 V3 Y5 K/ p
end;. S' i5 _$ `$ o0 l0 z+ Q: v
end;% n9 J3 |% Z C4 K' ~
end; -- of the method! C# ]2 d9 F! _ i# o: _
|