/* called by: entrance ctrl of the object 'track'
1 c! U' r. m% P T2 ^# Z*/
+ R( C/ Y& J% G0 C" G' Pis) _5 J; N% A. V: {2 C( A+ x: u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ E, Y7 T4 W& E" r3 n5 h; M
do! A. x" o3 i; N# y S
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 d/ O( w$ b3 S6 p/ A! H. A: x if current = @.Destination -- else return- H- x; U- _8 Q/ g$ H
then( S0 \ }3 @- J" r" \
@.Destination := void;
& _3 u1 q) }" y k if @.occupied then
3 l6 n/ L& a$ {+ T% d% o part := @.cont;
9 C: Y2 O9 t5 ~# R W @.transpOrder := void;/ j, l# T, i' z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 {! ]( b6 k. l4 K @,root.eventcontroller.simTime);
9 p* _& a7 w2 E @.HasOrder := false;& M6 E" H5 p! u- D4 R- `: [- u
@.DrivingHome := true;! z) X+ t- c k
rgManager.tryToStartTransOrder;2 g# ~- j- C) X8 ^) C" ~2 }0 G& i
if @.Destination = void
; o: _( N9 i0 m) Y6 P; O- q4 B! f; N then -- no transport order for vehicle @
# v' B- D8 m- r* [* \ @.Destination :=3 b7 I: i/ C3 f' x/ q
rgManager.nearestFreeStation(@,track.~);' q! m( P, d7 v" [( M% c4 W
newDirection(@);
s" v- J7 n U$ `2 n$ F' t. Y if @.Destination /= void then$ n/ V c" M8 {/ q1 h8 z
@.Destination.NumReservation :=
* l0 ]3 \8 B5 c @.Destination.NumReservation + 1;- a' ^% y# m: E" w$ U. J, r
end;
# K3 S2 S# U3 c/ e, w! i @.CurrIcon := "drivingHome";3 e- h. {+ Z2 \) K
@.DrivingHome := true;
5 ?/ }( X; D; H5 V end;9 E) ?" h' J \1 S+ N- `+ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 P4 T$ L1 v+ y3 u {
part := @.transpOrder;/ p# S5 h" j& v- @$ V% i
part.move(@);-- load part
" W! N3 ?+ z( B @.CurrIcon := "load";
" U, N% B& w& }5 `: g2 {! m" ^ GlobalDistObj := part.globDestination;: K9 J3 e3 I; ]$ G( L( N0 K" t
assignLObj := rgmanager.rgAssignL;
; j7 P2 m5 g* N# s# A" ^1 I5 \ row := assignLObj.getRowNo(GlobalDistObj);
& j6 z) j0 y- R# H' m: I/ v if Row = -1 then -- since 70
8 } @ \& K' ]) u5 N. i; {$ Q, p( E5 K if lan=1 then2 n2 i$ Z5 ]( l' A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 ]: k! E, r* N* L" d to_str("in der Andockstation: \"",?.~.name,"\""));0 a% L! J) u5 `1 f! d
else4 k) n; i0 o. B/ f" K2 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 y. @/ ]* R. K3 `. A6 V to_str("in docking station: \"",?.~.name,"\""));
" q1 w" Y' B) F0 z end;' T8 }7 m. l0 x( J8 V4 H
else
- \, V: O, ?1 B5 G @.Destination := assignLObj[1,row];
' u& G# r1 q ]# f8 b end;
) [0 y4 s4 [* C& r* z `/ P& }# } newDirection(@);2 Q+ x `# B' P7 S, ]- u* f+ C7 a: A
@.HasOrder := true;
1 q @8 j5 D, }4 V end;
: y* D9 P! Q% B C end;; D, X: W, t, ^! W
end; -- of the method
$ Q! Z3 [1 H0 a% X1 X* t+ W |