/* called by: entrance ctrl of the object 'track') r8 i0 Z$ n6 L1 z1 X4 w0 i0 n
*/$ m' L# O% f4 Z0 q9 h$ m9 M
is
/ |" h/ Z1 L& ?0 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 A- G6 H A0 b p5 c/ V4 |1 P% Jdo
' C v" c( o/ D% \3 u7 C Lan := rootfolder.Internal.Tools.AOLlanguage;( v! b% k' H+ y4 U1 J7 t
if current = @.Destination -- else return
) M# M1 r4 l& X5 {6 f% x0 ] then
3 x1 t! r! f: H1 _ @.Destination := void;- k6 B" O6 t6 s( L7 P
if @.occupied then
: A7 c! W" D8 r2 h part := @.cont;7 ?( ^; D3 g7 g
@.transpOrder := void;$ E; M- t% t4 k) Z6 A! k) i. g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. N4 b7 S& K9 a. {% ?+ k
@,root.eventcontroller.simTime);
, m1 w: q. `. K( D1 m @.HasOrder := false;. Z/ c: q3 p- P( ]8 D- s
@.DrivingHome := true;
, U$ |' a6 }& |4 Y# n4 U rgManager.tryToStartTransOrder;
7 r1 B2 K( f. P G4 W" u if @.Destination = void! m. C* H; N2 v% f2 g9 s9 U% x
then -- no transport order for vehicle @
* E( m1 r B c$ J7 o4 D5 Q @.Destination :=
! I/ q9 [- R! M; ~0 v rgManager.nearestFreeStation(@,track.~);
- V6 X& c2 r2 ~$ K. \ newDirection(@);
* t% I9 T f/ ]5 G# U V if @.Destination /= void then2 q" k- C0 o; C$ u W9 x# t; P) G; \( S
@.Destination.NumReservation :=
$ G( T; D, w+ Y5 ?$ N2 N* @ @.Destination.NumReservation + 1;4 i' ~$ _0 ]6 Z: u
end;' J# I! e2 K6 B/ M: Y+ |5 F2 t
@.CurrIcon := "drivingHome";
, C: ^- o2 w) Q8 B7 r @.DrivingHome := true;
' q8 Y8 c$ D+ l, G$ X" ^ end;2 {2 b' u2 p3 J$ U- b3 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, i0 ^4 P. o k0 w part := @.transpOrder;
' y8 {7 r1 @1 Z7 y" q1 [+ f part.move(@);-- load part1 ]# E' D3 K+ y- _, ?( A
@.CurrIcon := "load";4 W/ A" M: K0 N) D& _9 g& i/ }
GlobalDistObj := part.globDestination;
; b. @! R& M, u6 T* W4 M( V" u) h assignLObj := rgmanager.rgAssignL;% g& l, L c. \3 o0 H0 V P; G
row := assignLObj.getRowNo(GlobalDistObj);
0 l& f+ W) Z! [1 W& a" N- I+ T if Row = -1 then -- since 70
9 F( ^) j4 {# |- J if lan=1 then- q1 M" O0 G) L5 }1 S0 x" D% w1 Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 G$ f- a& V+ a1 N# V to_str("in der Andockstation: \"",?.~.name,"\""));2 Q! k/ r; \$ a. C! E- l
else
8 f8 {" G8 r: S/ b2 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E5 w" ^% k' f" w- A, Z. v to_str("in docking station: \"",?.~.name,"\"")); 3 x, }7 e' J" C+ Y1 X
end;2 [ ^8 B8 ^- \: ~) v
else" V l4 }; w b7 O2 Q
@.Destination := assignLObj[1,row];- T8 k6 i3 {7 A+ u$ ~. k
end;
* E4 z! i2 f# \7 F% [" M. M newDirection(@);. @5 M! ^& ]: p& W
@.HasOrder := true;2 {' Q- @, e8 j# [3 O: U
end;5 W2 X: h+ c/ \. _* O, B+ M8 |+ u
end;
) W' l: C5 d: [( j: _' u/ L/ {end; -- of the method
2 G- L3 I b$ t1 E7 {0 y% E |