/* called by: entrance ctrl of the object 'track'5 \4 }0 g+ ?) k7 N% d' [+ }
*/9 V$ H# a/ ^& P4 R8 g# ~
is
: ]) y" P- {6 D# n. y& G part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 u7 k/ a1 g4 Q3 E3 O
do9 w1 n# C" I+ F# e
Lan := rootfolder.Internal.Tools.AOLlanguage;$ z& v g! a& j& e: N$ n+ `
if current = @.Destination -- else return* ~) J# \& A7 G5 a8 E
then& g1 l. M: C9 D& B6 z0 d2 ]3 @0 i
@.Destination := void;) b4 k" y, {# C0 i) v5 k' a2 Z
if @.occupied then
' P3 e% d. R" Q! m part := @.cont;
n* s1 e8 P Q" h3 k$ q6 T- }1 z8 Y @.transpOrder := void;
. R* y6 w' D5 T5 M( Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: \" \% S) H4 c. @; p @,root.eventcontroller.simTime);
* `0 k3 ?$ {2 [4 B" x; S+ W1 d @.HasOrder := false;
& D& v& E# N- m. w6 L: _( D @.DrivingHome := true;" ~5 y) h5 R8 @) ?# b
rgManager.tryToStartTransOrder;( y, A4 z( U0 J, V: _. k
if @.Destination = void/ t% t/ a, O, u4 f7 X2 J
then -- no transport order for vehicle @+ s' B ]- t3 J. w3 _* @
@.Destination :=) h% j* S$ g9 R8 H
rgManager.nearestFreeStation(@,track.~);
" {1 K4 i( a/ C# `# \) @6 ?3 P newDirection(@);
3 f$ n' @! k- o( }0 p if @.Destination /= void then- J0 w: K1 d: |
@.Destination.NumReservation := N' C- d9 M5 H u6 p# v x* d3 p
@.Destination.NumReservation + 1;6 a5 K2 Q8 L+ E8 L) a" b# y3 U. f
end;* e x5 g* L2 V# y: j P. F
@.CurrIcon := "drivingHome";" n' }% y- f. o3 j8 }. W+ Q6 z
@.DrivingHome := true;
" X& @$ D' k& { V) `8 G8 k end;1 N" ?- R5 c; @" b/ o9 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ?' v6 s* Q& v. ]" F; I, w6 l part := @.transpOrder; [* K# D# m( _9 w5 u
part.move(@);-- load part
' Q7 d- j- h4 `, t! t+ `7 F5 Y @.CurrIcon := "load";+ a3 y' Y' Q' V
GlobalDistObj := part.globDestination;
. K' O) H3 g- f. Q2 d assignLObj := rgmanager.rgAssignL;; R( T) B. Q5 Q
row := assignLObj.getRowNo(GlobalDistObj);
4 T3 f- [- W% w) T0 ^& x/ U if Row = -1 then -- since 703 ~7 Y8 M$ m7 M, }" Y
if lan=1 then H* K2 Y4 T9 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 |$ C# ~. w4 L1 ] to_str("in der Andockstation: \"",?.~.name,"\""));
# x9 L/ M7 U# n* q else! ]4 w( f! u" ?: t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," Z( D7 J& z8 s, x
to_str("in docking station: \"",?.~.name,"\""));
& R, ]' y1 F. n6 a end;
$ q; N1 b1 m$ }% S2 P0 _ else' q3 ]' O2 p& A$ i9 S* D
@.Destination := assignLObj[1,row];
+ I! D, | q1 J' c9 E* F+ @ end;
! F, ]% s% i. f3 `( u newDirection(@);) z+ G) ]/ q, t! [. K3 g
@.HasOrder := true;1 _) Q0 u4 u+ l. \5 T
end;
; u9 H6 W1 A9 D! f0 B end;$ c3 Q1 {% R; a( d) h
end; -- of the method$ B6 [* |. \! y
|