/* called by: entrance ctrl of the object 'track'! A3 g h! T) p, O0 p
*/+ ~( p$ K2 ?# X6 t) }8 }6 ~6 J
is3 x$ ~$ r1 i0 B) ^8 U, V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ m5 T- E& H$ Q3 E+ M3 ?! _' O. w
do/ f; h: s& j5 T3 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 q* G9 @ N) s2 x' m6 C5 U if current = @.Destination -- else return
* k0 s0 H5 N$ V$ d- w2 V* k. O& J then/ Y2 e/ g8 _" C) S! D: q) q
@.Destination := void;
" ^: c2 |* b" c& [5 A1 ?- Z! |. s if @.occupied then6 x+ C d( D+ W& _+ G( j( u+ B
part := @.cont;3 T( D' r7 J, f) e; O/ i5 A( |5 |
@.transpOrder := void;" \3 U; A' l8 H2 q L5 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# t! W8 o Z* i" J
@,root.eventcontroller.simTime);& n, N" @2 X- I
@.HasOrder := false;( S6 H4 a P& T
@.DrivingHome := true;
- E0 Q2 o9 L% P( t) u4 V* S rgManager.tryToStartTransOrder;2 d3 C! Y8 q9 w5 V, i! S- w+ O
if @.Destination = void8 ^. ]+ r7 I5 t' r4 q6 v7 l
then -- no transport order for vehicle @2 i' k- Q, |! p1 U* {$ h$ Y- Z
@.Destination :=8 m/ V3 w: X7 M9 ^- r) h7 Q- Y7 d9 J
rgManager.nearestFreeStation(@,track.~);
0 t! ~- {# \) l* p' j( y8 ^9 K a newDirection(@);
$ \5 M% S0 i3 [ if @.Destination /= void then
" ^, S" h. |$ T+ O4 S @.Destination.NumReservation :=, V6 d& U4 ?1 r. M' b8 Z) E4 l
@.Destination.NumReservation + 1;
- X& v2 k: L4 F7 ?% M: s$ R/ Y end;
3 |( b4 y/ Y$ w8 m @.CurrIcon := "drivingHome";
+ X2 J8 V* M. j& E) x @.DrivingHome := true; K$ \. Z, R0 _- @
end;* P$ w. [2 t a* r% n' C; F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 @; P# h6 o5 V$ _5 F" {/ ?
part := @.transpOrder;" E6 M( ?; v- W6 c/ A& H. }$ ?( t
part.move(@);-- load part
7 z& R; a- l# M0 T @.CurrIcon := "load";
% C7 j( i7 O4 C1 P9 T. v. Q$ Z2 @ GlobalDistObj := part.globDestination;
) w& h, d2 q# r# u6 k2 } s1 S assignLObj := rgmanager.rgAssignL;
' G4 Y- l! r9 W7 k: L& Y row := assignLObj.getRowNo(GlobalDistObj);
% W0 s& C, t( g1 A- Z( V if Row = -1 then -- since 70. \: @( `* T3 b& i
if lan=1 then
( n) n8 y* \ r! T3 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 i( B1 X0 b" M, N to_str("in der Andockstation: \"",?.~.name,"\""));
( G. O4 F+ A! F h3 A7 `$ s4 D8 W else8 Q A7 d: L m: l f) _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 q2 w) B- y( u& _ to_str("in docking station: \"",?.~.name,"\""));
v* P: N- D3 R end;$ f1 K& _ e% ~+ r h: I5 R' V
else
; S# r% E- P0 y+ `& ~' e @.Destination := assignLObj[1,row]; N& ?- X* L# ^( ~/ y1 @
end;
5 x$ w% @8 p8 }8 J. d: Q! n newDirection(@);9 G" Q N( S) ]4 w
@.HasOrder := true;
1 S2 I9 U2 ^% r* K& M, n& ] end;
4 W( `/ J$ l) a0 r end;
) A; k) h/ p7 r8 K3 mend; -- of the method
, o& W& p' h( |. X |