/* called by: entrance ctrl of the object 'track'
3 C) T: V I8 T. I( S*/* n8 y, w& ~9 U+ r$ {
is
1 Y- b" H- d) t! D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& c. P" G8 R( Rdo+ ?- ~- ?2 @6 j! i/ b5 `9 z
Lan := rootfolder.Internal.Tools.AOLlanguage;4 d# m4 d4 ? i
if current = @.Destination -- else return
5 f8 Q; `. U; V3 s$ f1 D. Z$ K" c then4 V( X: Q }% |* i1 x' A
@.Destination := void;$ C0 a" J- s4 X" b0 ^
if @.occupied then/ D7 ~& a* z/ |) {2 L
part := @.cont;
* l1 K* R6 }4 Y+ c @.transpOrder := void;
5 W8 V0 S. T+ \! } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% m! S9 a2 L, `/ j5 j
@,root.eventcontroller.simTime);
7 X) m% m4 w; C: S @.HasOrder := false;, W( r# H& k; U; A2 h7 G7 S
@.DrivingHome := true;
- u7 f" p% \# s5 \ rgManager.tryToStartTransOrder;) Z! e. Z! y9 c+ T9 Z
if @.Destination = void
" N& g* H0 ?5 s: } then -- no transport order for vehicle @& r# R4 O; Q# W) F {' ^" y
@.Destination :=1 {3 f+ m$ H# n1 I8 M# H
rgManager.nearestFreeStation(@,track.~);2 x% @2 B+ r6 J+ E" R
newDirection(@); 5 E* O) Y/ l& l' p' w
if @.Destination /= void then
4 t0 G4 @. b+ _* x @.Destination.NumReservation :=
& q/ i, G3 ~4 g1 O" f' \. J' k. a @.Destination.NumReservation + 1;% D( [) H: D1 A; L( I& \1 j
end;
) w. O6 l3 |4 C1 E @.CurrIcon := "drivingHome";( v( i# F& N( x( w: Z7 c
@.DrivingHome := true;
2 H9 g; Z" ^& Q% g% Z end;7 @7 z. b7 P# q! Y4 @$ O! w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( f% X( r6 `; {! Q. q part := @.transpOrder;7 u: y/ m& w7 l5 e* w" r/ p1 t. J' ]3 D
part.move(@);-- load part
5 {6 q. @3 h& _- V6 a' U" w: d2 L @.CurrIcon := "load";0 ^# V3 `! p& g' F
GlobalDistObj := part.globDestination;- \- ]/ i. a5 Q& u o
assignLObj := rgmanager.rgAssignL;% R$ q$ c- m, l8 C
row := assignLObj.getRowNo(GlobalDistObj);
. O# L* u' d% _9 A1 x6 w, C if Row = -1 then -- since 70# ]9 g2 ~3 s `% U8 R
if lan=1 then
! @. A+ o/ o" g% [3 A* n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) J" M T {% |3 @* |1 } to_str("in der Andockstation: \"",?.~.name,"\""));$ J2 I9 B' t" V4 v6 e% `
else$ F. s7 P# V) r: k, |; {4 N! {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! U( p( @2 t/ Q: c( R$ s
to_str("in docking station: \"",?.~.name,"\"")); ) F5 w5 h0 K3 K# W
end;9 T7 J+ l8 V& r
else
m( \. }, t( U8 T7 e @.Destination := assignLObj[1,row];
( H8 A3 ~5 e- L% s' e: ` end;
. W0 ?9 F- O5 u& @5 D# ^ newDirection(@);
8 N- s: f I6 b* k7 s' ~7 `# u! { @.HasOrder := true;
7 P0 ?" j. q* M+ ?0 U6 o# B! I y' W" T end;8 O0 d! J# J& x. K7 ]( P& F
end;
% T1 H- G. ], {% P2 yend; -- of the method
) z2 X& d% w7 p' G |