/* called by: entrance ctrl of the object 'track'# y6 c$ P5 x1 k6 |5 o# t# ^# u
*/
8 f; U6 B/ ?. A/ f+ {* ~; Fis
; \/ k. G( B, C' x" Z5 N! P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 X) l, F+ K! {6 N. _do- G; u, s9 Q: ]" Y9 k) \* A% F
Lan := rootfolder.Internal.Tools.AOLlanguage;
, T$ h Z0 e1 |/ P) p( v9 e1 S6 W if current = @.Destination -- else return
4 I. M0 Q( h. j/ D, g then
8 ~2 a' f7 w- T v2 }$ ^# W @.Destination := void;
- V, |% V e2 p2 ]1 I if @.occupied then' F: m. j! R. j7 ^! a. M
part := @.cont;3 v8 P( c; ]7 `& }2 w
@.transpOrder := void;3 x; A3 u: \9 I. C: i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" R% m* Y1 c5 M' R @,root.eventcontroller.simTime);/ s' C, L1 a' Y8 m M3 o# n
@.HasOrder := false;% a7 r/ ]7 D% \- Q v
@.DrivingHome := true;+ ]7 L" Y$ p; i m+ z
rgManager.tryToStartTransOrder;- ?- A# ^8 h% c6 [
if @.Destination = void
% k. O6 E+ Q* B! p- _6 J3 {4 V( Y; l then -- no transport order for vehicle @
1 A" Y- |- g7 O* W/ W. Y @.Destination :=
4 X7 N8 T$ G) n! X rgManager.nearestFreeStation(@,track.~);
4 T/ i; _5 S% c$ N& ~$ C4 h" E newDirection(@);
9 [8 x7 V& \$ X. j# M! e+ I if @.Destination /= void then
, l7 X% @, D7 h2 p! w @.Destination.NumReservation :=
: c& K0 \* U9 i( {# p1 p @.Destination.NumReservation + 1;$ m N( X6 e+ x& ?6 l8 M& j
end;
9 c% W* D& L. m4 C$ F% ~ @.CurrIcon := "drivingHome";6 Q: v% A$ z* L* ^4 B
@.DrivingHome := true;. w; ]6 H7 H Y6 R9 G
end;
/ p W6 H. ?6 B- V2 O) ^: { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 {, R! x, b2 R+ }. C4 V) g part := @.transpOrder;5 Q+ g, o1 Z3 h2 D4 ], C
part.move(@);-- load part
! ?) ^# z/ o1 N! d! |) { @.CurrIcon := "load";
2 E2 V$ w6 M L8 T; c0 n GlobalDistObj := part.globDestination;" v) _* V) P( r- y/ x
assignLObj := rgmanager.rgAssignL;
7 i- D' T- K% t2 ? row := assignLObj.getRowNo(GlobalDistObj);' |% C x# l8 t
if Row = -1 then -- since 70- {# t; a$ j( u, Q0 |8 k
if lan=1 then) T z9 p* j3 K. C0 }; m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; [0 Y# v$ }, g8 ?* r4 U0 s to_str("in der Andockstation: \"",?.~.name,"\""));
0 _4 {* }+ c! q; M: f else
' [# C8 z8 T; q" C+ O, u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! ]0 M2 s; A( F# I& J2 P$ g, X1 k
to_str("in docking station: \"",?.~.name,"\""));
9 l; H: U. I2 d; b; ]' G& F- V5 S9 v end;4 _( \; \6 c% i) q( q
else, p2 v; @ T8 I: b
@.Destination := assignLObj[1,row];9 p( F5 L9 S. ~* I' k
end;
; n/ ~. w& l/ @; S* t6 A newDirection(@);
( m% @" h) Y& T0 ?- \% n; z @.HasOrder := true;
4 B; x) k) U3 s" ^& c% E end;
3 p% J8 }* f) e% j8 n end;/ n7 s- E3 H4 l. o
end; -- of the method
! T3 x7 U }: j, |! } |