/* called by: entrance ctrl of the object 'track'% M9 x" u1 ?# P" Q8 f( V
*/
6 N; r+ _$ Z0 ]+ u- ^4 x! ^- i5 eis6 g( a8 w% g( Q0 t2 g1 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 a _; T, s4 Y4 u7 U1 Rdo
$ ?* f8 o4 A$ S# F: B8 \ Lan := rootfolder.Internal.Tools.AOLlanguage;: p. h; x) j: b7 v- Y+ C V
if current = @.Destination -- else return
- T7 I0 v4 C4 ] U3 X; R& s) x then) X$ k% N9 Z* Y, E+ R6 v, f6 p
@.Destination := void;- o- _8 K& G e& W; m# u9 u
if @.occupied then
% s; L1 c+ C3 b8 f! ? part := @.cont;
' E* Q3 i q7 Z' { T @.transpOrder := void;
3 S" k# Z; E A- l9 F7 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( Q& i0 G( m7 T+ W2 y* c @,root.eventcontroller.simTime);
! }- H& U' J7 q- S @.HasOrder := false;3 h: s) t2 P# r9 H( b/ z6 E
@.DrivingHome := true;
/ r8 A1 t" M% j8 p+ n rgManager.tryToStartTransOrder;5 P% I/ ]4 G, e( Y* ~( T, C% V4 W
if @.Destination = void
! R: S. s5 Z# t7 I9 W' ]6 A then -- no transport order for vehicle @1 G, O) t2 A/ `9 s
@.Destination :=
0 s' V' k9 n ] rgManager.nearestFreeStation(@,track.~);' J& y6 O- I! W( M; g0 E
newDirection(@); 4 f3 d: l6 ~- {& H1 @
if @.Destination /= void then1 [( G& ^/ `# B4 S
@.Destination.NumReservation :=) E% V# P+ }3 C6 O: j
@.Destination.NumReservation + 1;
9 J J* Q+ ?7 U5 O5 O# ?' f end;
+ D& K) C6 s- N+ W+ v# } @.CurrIcon := "drivingHome";& c' k) Y2 J3 x) {" O" f1 h
@.DrivingHome := true;
, H+ b" P0 R. l end;
$ }* c! P, R2 d2 [' f2 ~6 t; K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( ~. T3 y- L. P2 \8 h1 N1 ~ part := @.transpOrder;# R1 d( {3 \6 |$ D" N
part.move(@);-- load part
" U4 {0 x* y. y7 y: c% B @.CurrIcon := "load";+ i* p t6 u4 e; {/ q
GlobalDistObj := part.globDestination;7 I% b7 ?6 l) N8 y# W
assignLObj := rgmanager.rgAssignL;
8 i/ k3 w G( o row := assignLObj.getRowNo(GlobalDistObj);/ z% @! i S, P: ]
if Row = -1 then -- since 705 t3 O" |8 h$ q, h6 A8 w
if lan=1 then7 w% j8 o; {1 K( g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ~( Q5 Q) U; V: r to_str("in der Andockstation: \"",?.~.name,"\""));3 N6 @7 H1 l1 J
else) \* r w! u) W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 n* G( n. H5 x3 d0 c6 ?
to_str("in docking station: \"",?.~.name,"\"")); 1 p/ l" i+ _4 B& B7 W; f
end;# U& g- E2 E% s* \- e. o$ q
else
7 \7 R! @9 b, H4 a7 [% N- e3 Q: a @.Destination := assignLObj[1,row];
5 n' }$ m9 w/ I/ {7 ?8 p* }, b c0 ~, r end; 5 k" E% ]6 e" h5 Z% i
newDirection(@);8 G* v( T$ E5 y$ E6 K; v
@.HasOrder := true;
) {$ L8 t! P% \& Y! { end;$ O: h5 ^& ~# t2 ^1 ^4 \
end;/ y) U& r* X$ m
end; -- of the method
O. L! O1 e- ^ |