/* called by: entrance ctrl of the object 'track'+ I; k+ \+ v& L: J4 ~1 \. [7 u: z' q
*/
c; e* I& u6 r5 Qis& }+ i* l3 M+ k: k. X4 |& u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& d2 m# s' ` t: `2 n
do
3 f4 T0 K& r7 f r0 M Lan := rootfolder.Internal.Tools.AOLlanguage;# r% _' w. Q* t+ z1 u. ~ y$ y, y
if current = @.Destination -- else return/ q' i* u' R- \- _+ S
then
! x! [2 s$ {7 \5 x7 J% ^2 f0 T" }" { @.Destination := void;4 S( i( w* }! d. H! a) h
if @.occupied then+ Z6 l3 {3 S4 D l0 r
part := @.cont;& Z$ g, ]% @/ g6 ]( t
@.transpOrder := void;
+ k7 y$ R( ]+ |0 Q7 e4 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," f. J; t8 i% H( M& L
@,root.eventcontroller.simTime);
0 a: E5 B( E' K; L" L& I @.HasOrder := false;3 E& k' Z& }/ M
@.DrivingHome := true;& Y" }' F6 O/ F
rgManager.tryToStartTransOrder;0 w, m+ W2 z$ z R# C
if @.Destination = void/ a3 f R) ^- n/ P9 O. Y
then -- no transport order for vehicle @
# N8 t- R/ {9 b. |# L& A+ m& ~ @.Destination :=) a! L5 x8 q3 u K. {' E
rgManager.nearestFreeStation(@,track.~);1 ~. b. [# ?0 v
newDirection(@);
`; w% x- U3 N+ P# g* U# V, G! { if @.Destination /= void then% N* |& l1 A9 y- C9 L3 P$ {
@.Destination.NumReservation := g7 K( }8 }& g" H: z
@.Destination.NumReservation + 1;2 {5 u( @' M% R, M% r
end;3 {, Y0 f! ~; W8 p/ S
@.CurrIcon := "drivingHome";; A, A/ I: Q. h- r$ D7 l6 y3 G
@.DrivingHome := true;
4 { M$ S1 g" u: x( _5 ~ end;
7 a; x6 e1 V' q' J, @. N2 u9 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ Q; X; n. L; N: f$ B: A' D part := @.transpOrder;
6 o$ f& L9 m$ d: z2 N: X part.move(@);-- load part
* w9 \* r7 C' H) O8 u @.CurrIcon := "load";) I u9 F) G$ O' k `' Z
GlobalDistObj := part.globDestination;9 E2 ?, u) s! z
assignLObj := rgmanager.rgAssignL;
$ X2 S5 a5 F8 f4 P row := assignLObj.getRowNo(GlobalDistObj);
6 q C7 @! p$ p9 |' R( e# T if Row = -1 then -- since 705 h# A5 y2 g" g# F! X6 `) u! {
if lan=1 then9 Q+ N! g+ o" B; K6 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 z* y+ x( I7 |8 U% o; X to_str("in der Andockstation: \"",?.~.name,"\""));5 |9 L6 {7 H5 t- K" _ N
else
7 A6 p3 C/ v$ E) R( T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' s6 h+ f6 x6 f- i6 _. k0 i to_str("in docking station: \"",?.~.name,"\"")); + @9 p0 ~9 t' ?" j
end;
7 j3 N p: M& O0 i1 \ else7 u: l0 g3 @9 b! x9 D
@.Destination := assignLObj[1,row];" [, \9 ?( F- X: b! j
end;
. I; v$ f! ^! p. f" e( n, ~ newDirection(@);
- q! E' P8 b0 i+ C% T @.HasOrder := true;
9 i/ O* ~# `5 o8 z# p$ B a+ Q end;; X1 {' E; I5 L
end;1 {- ? r2 B: h0 p) [2 V
end; -- of the method: F1 i9 V: ^2 c, ]# J$ X. G. r/ @ z+ i
|