/* called by: entrance ctrl of the object 'track'
6 o/ E5 `6 U6 D' s*/
' ?5 y3 r/ B2 z6 U) Qis* Q) P5 @$ i; Y% t, _; i2 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# O7 l, ?. O' ?- Ldo
4 D- y" c- i; J1 O4 l2 e( } Lan := rootfolder.Internal.Tools.AOLlanguage;8 I( r# N* _ L" _' ~8 o
if current = @.Destination -- else return
) J! K4 Q" X' c; l then9 U0 }# {6 Z% N
@.Destination := void;7 S; y2 E1 C! m. n) s0 A
if @.occupied then
% M/ X6 R0 Z: |7 h& v3 d E; b part := @.cont;7 b' k7 ]0 y: Z- u
@.transpOrder := void;
O7 k" p/ E* r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( l4 R3 G9 u* I. p" e! i
@,root.eventcontroller.simTime);
' j" o% {& m) h @.HasOrder := false;
: P. ?5 T" V- y( F' n+ |& { @.DrivingHome := true;
* |$ p7 O1 _( {3 g5 x rgManager.tryToStartTransOrder;
4 b; }5 X- u6 J9 f. e0 p7 V) m if @.Destination = void( `% ^# |% x' j$ G- D+ `# A% v
then -- no transport order for vehicle @! O; ]7 O3 o. K" T1 ^
@.Destination :=3 V2 y; ?% c1 \9 M' F
rgManager.nearestFreeStation(@,track.~);- J$ f; p! I! h w [* E
newDirection(@); 1 O+ q4 W; Q& Z/ |/ E
if @.Destination /= void then1 O, @1 U! J5 ~/ U- s0 I- K- Z' P
@.Destination.NumReservation := {% ?4 T) d- {
@.Destination.NumReservation + 1;, P G7 G# s) x$ S
end;" R/ h( j0 G4 I7 K
@.CurrIcon := "drivingHome";
2 j% `( \) ^* y, | @.DrivingHome := true;
( }7 C2 q! ]7 o! |8 } end;
' F# E) s; m5 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 W: N6 d& ]4 l/ W& W
part := @.transpOrder;
! m; H( R5 W3 v part.move(@);-- load part/ \5 v2 ?8 G. P. v6 E
@.CurrIcon := "load";
6 Z! N1 h0 j; X% j2 }( @* ? GlobalDistObj := part.globDestination;
9 ?7 B! T- M N' l7 P assignLObj := rgmanager.rgAssignL;7 G- Z( g& T! L$ d! |* F
row := assignLObj.getRowNo(GlobalDistObj);1 d8 Z! M: R5 \3 J0 v% |
if Row = -1 then -- since 70$ G7 z; ~8 M1 U, s4 m
if lan=1 then( g0 W; I, r( ~1 D4 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: M# B- z2 p+ C1 \% C$ t to_str("in der Andockstation: \"",?.~.name,"\""));
4 V F' w( |2 d% I3 d: N6 M, r else5 p7 Z* w- ]3 c: @( V R3 q& o" ?! U) l% P- X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! ]( A8 `5 ?" d5 S- w( S to_str("in docking station: \"",?.~.name,"\""));
9 B, m; B( V1 T, F/ s" I end;
2 I; F1 m* p5 Z a! P' x( h else
6 x8 T. ?; M1 M; z9 l! \4 b @.Destination := assignLObj[1,row];6 K, R( h# t: U. ^' p! U
end; ' u9 ~. {% {9 p8 ]! b- |' {+ ^
newDirection(@);6 E0 v8 |. a5 |
@.HasOrder := true;
1 g& ^- [% n3 \2 @! E/ d end;
2 w% e) q( e* c end;; f o& Q0 _) f7 ~" H
end; -- of the method
8 y& V) b' p! k5 C7 Y3 A- a |