/* called by: entrance ctrl of the object 'track'
7 u$ ^1 P( r, N+ B" u* V; d" ~/ P" s*/# Y6 |# s/ t8 x
is- F: \& b( F5 p" B- l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ S8 V, w" B* F% C. @
do7 s- }+ R9 F) D! d& ?% w) H# q! o4 A
Lan := rootfolder.Internal.Tools.AOLlanguage;
' | a2 M) |. N7 M9 q' H2 M if current = @.Destination -- else return' {( q+ M3 D4 C4 x$ _" ~( j
then/ {3 p- K! x; A$ \. ?4 v& q
@.Destination := void;
7 i8 |. R7 n# K4 f3 t' t A if @.occupied then
* Z* ^ L" {2 F part := @.cont;
, _% c/ ?) ]0 |3 N+ e @.transpOrder := void;
" [& B" Q/ _2 k( x" q1 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, g5 y/ Q, ^* t1 ^( l1 v# f @,root.eventcontroller.simTime);) }! }1 v9 {- c7 }& s( w
@.HasOrder := false;6 f+ Q; K7 [1 d% N
@.DrivingHome := true;: D4 O: W' u! l- O9 Y: T
rgManager.tryToStartTransOrder;6 J( _6 @0 x2 p3 a; _
if @.Destination = void
4 C. ~' ^* B ~/ S7 b' Y) y% H then -- no transport order for vehicle @4 l w- \% E) u) K) ~2 B
@.Destination :=
' S% u+ E' c2 ^1 Q rgManager.nearestFreeStation(@,track.~);
' R u0 i* Q& f. A% h I newDirection(@);
- ] `& `6 c! ^2 G0 z) Z if @.Destination /= void then1 N" R4 T9 z4 ]) b" Y( N( N
@.Destination.NumReservation :=5 D0 i7 q1 @1 p: A1 c% C* F3 i( d3 v
@.Destination.NumReservation + 1;
- V' e; r% a6 @. H end;
3 e& G( h/ q$ A6 g# r% m/ }% x( s1 N @.CurrIcon := "drivingHome";1 I8 }3 r: R, {4 ?) c! [, i* g
@.DrivingHome := true;
% o! M/ u4 j' h/ ^6 g/ I# [) g end;3 F6 |9 a- W8 K- N1 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 `' q. ]* Z* u* V9 X' W part := @.transpOrder;
" A) m; l# |1 ~9 X part.move(@);-- load part2 Q9 t! y8 w9 z2 U4 q4 E
@.CurrIcon := "load";
# j) _0 }9 t: l, a- K. ] GlobalDistObj := part.globDestination;
$ l7 u# Q1 d+ X9 j* K# C* K3 T assignLObj := rgmanager.rgAssignL;
8 Y1 a/ S+ m1 C7 z3 j row := assignLObj.getRowNo(GlobalDistObj);
& m/ x5 W3 O8 R7 F5 ~* N if Row = -1 then -- since 70& P2 |: k7 k( O- T
if lan=1 then
- O1 h5 P- S% J) G4 j1 b4 Z: G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( Q2 }7 f' Q' d to_str("in der Andockstation: \"",?.~.name,"\""));
5 G8 G% u4 a3 L) s& J" M else6 I A& N7 S% P+ h; d5 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* l# j, W! g& \% P1 w: Y# o4 m to_str("in docking station: \"",?.~.name,"\""));
# P% Q! l) }0 ~7 F2 O0 V. U; P end;$ {3 x3 d( e0 d5 A8 u) q7 j
else( P- x d" x4 L* |; O; ?- Z
@.Destination := assignLObj[1,row];
) o2 t% \$ w* w' r, U end;
, K. N4 o. a4 [" D1 T: g2 V/ Y newDirection(@);
1 k* ~5 i2 i1 w9 [ @.HasOrder := true;! R6 I z7 F o" [9 B
end;
e5 a& l+ G8 r) `# S1 f7 X end;
: D ]0 w" b& ?9 C1 ]. ~) Qend; -- of the method
# ` q2 J3 R: ^4 O! W |