/* called by: entrance ctrl of the object 'track'% Z) L9 Q2 f: y7 P6 q' Y
*/
1 Y- D; Y9 ]' S7 Ois; |* C( ]" Y) k/ o1 Q4 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 J8 f$ ?1 h# E. B. ddo0 \2 \# |3 s( W# p
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 y( k/ A$ b2 i if current = @.Destination -- else return( s" g3 z) P6 |6 K' a0 b6 e
then, F: i0 W: F. w2 N- i
@.Destination := void;
; h. k) ]2 r0 r# ?5 P: U if @.occupied then7 {8 l3 }5 D* Q6 W- e& ~; e: |
part := @.cont;! X# o2 b$ A- ^. C2 V
@.transpOrder := void;1 X+ Y/ z$ B$ {2 r* @, Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |3 e# h" C% ]1 }5 U @,root.eventcontroller.simTime);
. A' ?8 X) u3 X0 v% t @.HasOrder := false;
0 }& s9 H, I" N" t( u @.DrivingHome := true;
/ T5 G9 V3 H' Q) d% c L: r rgManager.tryToStartTransOrder;( I' w- l2 b# L
if @.Destination = void! W. ~* z+ l4 y4 h! R
then -- no transport order for vehicle @! K" O# V$ ]* X$ k) R) u6 [$ Q
@.Destination :=
# g1 m# R8 Y7 x% R5 i rgManager.nearestFreeStation(@,track.~);
- H$ }% z, R1 e1 q newDirection(@); 0 q, Z W! C7 t: Y2 d' F' e; o
if @.Destination /= void then
0 b- i/ E3 S3 @3 X2 M" ]2 A @.Destination.NumReservation :=3 z- m3 M0 o0 H$ `& z2 T
@.Destination.NumReservation + 1;
! @+ ^# H- s! ?. R8 ? end;
7 b2 m* R4 n$ a# x# c @.CurrIcon := "drivingHome";; |* ]2 h( ?. H" C6 X
@.DrivingHome := true;" F: S4 b5 |' j) N9 e) j; Y1 P
end;5 r1 Q; ~3 a/ ~3 K7 n. Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ H' [0 Z% V( L! g; D; u f5 c part := @.transpOrder;
. Q) s7 p$ N7 T- q4 c part.move(@);-- load part
. h$ h3 c4 C* N8 f X: ] @.CurrIcon := "load";
' B! m' B' w) ?% P4 | GlobalDistObj := part.globDestination;; ]- |# F f$ d) G+ V
assignLObj := rgmanager.rgAssignL;1 D8 u0 C: o$ [! ]; P* v3 |
row := assignLObj.getRowNo(GlobalDistObj);' i! e! p$ y( ^1 D8 q: u+ D; L. a
if Row = -1 then -- since 70
9 S8 }, ?; u, ` if lan=1 then
2 ? |( u. L2 H* B$ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 w. H9 U) f, I y& J! K to_str("in der Andockstation: \"",?.~.name,"\""));! i" J9 g4 w; m( Z! h0 | M4 P
else5 e5 s, T c& G9 g* j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: q, [- g9 P" d5 E/ n6 ?" { to_str("in docking station: \"",?.~.name,"\"")); 6 k: [0 l- L9 \& w, i" T. H% b5 {
end;
$ Y2 \& ]. j) i else1 t. W' H" n+ Z& ]; o* t
@.Destination := assignLObj[1,row];6 i1 g3 A. y0 @, K1 }% Q' o
end;
" n& `4 a: K G+ H' W. _7 d. A newDirection(@);
4 p9 L* V2 T7 c2 H+ f, Q @.HasOrder := true;3 B7 ~, j4 f% y
end;
1 G& a+ N2 h+ p& l3 u3 G end;
: v0 g8 z5 _1 K8 y6 S; x: hend; -- of the method
7 ^# v1 W* e: \( ]+ S8 E$ I% r* ` |