/* called by: entrance ctrl of the object 'track'
" R% a# n, K- Z& U2 M6 P*/
& l( l$ h2 H5 B* O( F5 Mis: j6 ?& v2 P3 \' @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ Q8 t6 \3 S$ [do
( L+ i) g9 L8 w/ K9 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
0 v; `& ^9 ~/ v: G+ a. m if current = @.Destination -- else return1 j9 k. O; ]0 l
then
$ C9 x& y% j7 {, [" x @.Destination := void;
+ o. S6 D# X3 Y, C2 P0 x if @.occupied then
, n3 g7 E) V2 ^/ _ part := @.cont;
# ~0 Y3 u* p. c) a7 Q9 u3 }5 V& c @.transpOrder := void;
# |" `' }$ x/ n' Z# E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Y) o5 p, R3 \- y: T
@,root.eventcontroller.simTime);
* I) l" O& S8 D! j4 M9 L @.HasOrder := false;% P1 N5 y6 J, [" b, c/ Z- i, N! t5 t7 g
@.DrivingHome := true;
8 e, D: |% V7 G2 ^' f5 Y7 \+ s rgManager.tryToStartTransOrder;# N0 v/ m% G+ g. X$ {* R4 i
if @.Destination = void$ R; q3 q' c. |) L
then -- no transport order for vehicle @8 \2 P. E. ?0 e+ U5 X$ @' _
@.Destination :=
( l& `7 ]3 a! u9 K7 J8 e: C rgManager.nearestFreeStation(@,track.~);
- X. @; t/ L+ U+ F& D! M newDirection(@); : y2 W6 A' M& i3 a1 g$ o, N/ a
if @.Destination /= void then8 U1 m, n$ y: c7 N8 A o
@.Destination.NumReservation :=$ N+ |% f/ w% x: z; \7 c
@.Destination.NumReservation + 1;/ W) f+ B6 S. S1 X- @
end;
! {9 M m7 v+ C. t @.CurrIcon := "drivingHome";. N! R# j4 |! ^' W$ n6 k' b
@.DrivingHome := true;
2 o$ o3 T' l0 y# L) F0 E! d6 C, E end;" @0 S0 d c5 e5 O& G3 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 E/ Y% G1 g; {& K
part := @.transpOrder;
* X+ l+ q+ o }- d part.move(@);-- load part: ?; q: T5 [9 A% p
@.CurrIcon := "load";
9 q" o$ z. c9 D! h$ p$ n: W' c- Q GlobalDistObj := part.globDestination;
9 S% j4 _. d( }' o3 }) Z- d assignLObj := rgmanager.rgAssignL;. b) q4 R" A1 r9 n
row := assignLObj.getRowNo(GlobalDistObj);
! W" ^" N* v4 [$ I( O2 X6 p if Row = -1 then -- since 705 T; t0 F9 c) m
if lan=1 then% g8 T- w( D8 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: h4 Y8 t: p; r: Q% p/ @. m/ {3 \ to_str("in der Andockstation: \"",?.~.name,"\""));" ]9 N9 f' q w* \
else
. t- f8 w" [8 Z& L9 M8 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 c6 X; G; @/ X# G
to_str("in docking station: \"",?.~.name,"\""));
) p% c7 f' Y8 [8 c; A/ U end;
, R$ Z1 f6 j3 ~! f8 N. G! z+ G; p else
5 ` G( s6 c$ Z0 F7 ?7 t1 T @.Destination := assignLObj[1,row];
1 J* C" Z g' d6 c0 e7 u$ L% g0 b3 | end; 2 Z6 _- f9 z% v i
newDirection(@);
& T* H! i" Y9 X9 S; |( v' u$ f5 s @.HasOrder := true;
4 z' B, f4 w0 n end;
( b+ Z1 x! t; J4 Y: F end;% Q* B* ^) P; Y) B8 B: y8 Y. ?7 S
end; -- of the method
! m" x: z- i) [$ S; r& l; r |