/* called by: entrance ctrl of the object 'track'
5 H$ ]$ O3 p& U* v* D) i O*/
: u/ P3 e p/ N& }. m/ _, Dis7 o- j$ E' P6 x9 u0 g$ p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% u" E4 ~; T' f; Z/ |- o
do
1 D4 g9 ~$ b1 X: l: h5 s4 R Lan := rootfolder.Internal.Tools.AOLlanguage;$ ?' s$ U& r i3 v1 Q
if current = @.Destination -- else return
+ l# q0 Y1 ~% q& ~" @' _; K0 w then
8 C: L9 A& t8 t1 P; p5 x @.Destination := void;. q* j/ U# f( Q/ l* d j7 j' b* c
if @.occupied then! \5 E, R9 v" ~7 @- g* o9 @4 y
part := @.cont;% `9 o" o/ t- Y. `9 n
@.transpOrder := void;
5 } N5 {7 ^9 m% v4 \5 @ [; Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 R9 |: \5 f2 L$ o @,root.eventcontroller.simTime);$ v+ N' J" `! h% S a% \) G
@.HasOrder := false;- C {1 D6 B. G: d* i0 ]
@.DrivingHome := true;( c0 |( i; K J4 v' t7 w/ c
rgManager.tryToStartTransOrder;
' H$ @$ r# ]2 a2 e% F if @.Destination = void9 p8 w% W5 J8 s& E
then -- no transport order for vehicle @" H% \; h9 [- t
@.Destination :=
" x$ A4 i& Z/ U: h rgManager.nearestFreeStation(@,track.~);3 ^1 W4 f' v1 T: T5 G2 z
newDirection(@);
, ~ v: @+ B9 l* \4 l1 M6 ^: Q E if @.Destination /= void then6 C8 v+ d. F- b9 V A
@.Destination.NumReservation :=
2 g4 c! u9 T9 I8 X @.Destination.NumReservation + 1;: s: b7 d2 t: \+ C7 r$ ?# v* Y* Q
end;, X7 W9 Y+ M R4 f( N; x$ w! v
@.CurrIcon := "drivingHome";4 W( h# g/ |0 [( i
@.DrivingHome := true;" P. G# W) y& A0 N. S% J
end;: d( L) P1 N3 l5 a- H3 f7 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# {# I: C% U7 s8 a( C+ h9 C2 p part := @.transpOrder;+ v% j: f+ r! d9 ]2 y/ ?, W
part.move(@);-- load part' J+ {. k4 o: V1 R s
@.CurrIcon := "load";
5 _% S/ @$ c+ x. Q GlobalDistObj := part.globDestination;/ r8 Z a$ |4 j- n
assignLObj := rgmanager.rgAssignL;0 H* }" b( c' x
row := assignLObj.getRowNo(GlobalDistObj);# ?$ O4 `$ {/ @! f% \* v( v8 u
if Row = -1 then -- since 70% f, E+ E6 L& N/ P1 [' H: x
if lan=1 then1 l4 ^3 B/ F4 g, ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; o1 ^$ F+ }# Z" `- p6 \ to_str("in der Andockstation: \"",?.~.name,"\""));
: n. M: Z5 g8 k7 i1 { else0 i( r7 E: B+ D$ |. }( V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" U* T! W, R/ X0 l3 M to_str("in docking station: \"",?.~.name,"\""));
. `2 b# B( ]2 H5 s, d end;
?$ c: I( e# w: f$ M# E& h$ Y else3 a4 A5 \& \. L* y: c& F. P( R& C
@.Destination := assignLObj[1,row];
) R! J3 d: c" L3 S" o- A end;
8 I6 p* {6 i) G newDirection(@);
+ r) z0 }& p3 P @.HasOrder := true;
* k1 C2 L* B1 V) H( C- H end;
) B8 Z" p- u1 [+ `4 W end;, }: N% b* f: X$ U
end; -- of the method
/ |# W0 G- M5 ?4 y p" ?' w/ O |