/* called by: entrance ctrl of the object 'track'% w$ P+ m( K' k# T
*/" r0 y' n/ i6 C5 X" k
is
- H0 E" o" O( k$ G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; y* U9 v) ]0 e: ?4 |do
/ S. V) w) r; p: i' c, V Lan := rootfolder.Internal.Tools.AOLlanguage;( }% _: n& j4 \5 z1 w3 H+ \
if current = @.Destination -- else return' y8 O' w( P; C/ u Y) a
then1 E. ~ ]9 G7 Y* r" \0 _
@.Destination := void;
) }( m: K& K6 r- C if @.occupied then, R- [1 |& U/ H+ p/ u
part := @.cont;5 @3 I( h7 X3 y d8 G
@.transpOrder := void;
9 L* e: Z6 e( j. k" g6 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {1 ~5 _: n' s {3 o* l& c8 t2 h
@,root.eventcontroller.simTime);
' g2 _; Q B$ S. Q @.HasOrder := false;2 y- m4 a* J6 U) Z
@.DrivingHome := true;4 D n6 T/ i: k( X! P0 F
rgManager.tryToStartTransOrder;' |% T* h2 V/ ~
if @.Destination = void
+ h. _1 p; K" b9 g7 _5 i then -- no transport order for vehicle @- y q k, p7 e& b/ M+ y8 H
@.Destination :=4 P5 x! \( u) y% S! J4 k
rgManager.nearestFreeStation(@,track.~);
& J5 j5 G; M) R& J) ~: I# n newDirection(@); / `4 N* A* w$ m! B! [
if @.Destination /= void then, \9 F8 Q# K4 r8 t
@.Destination.NumReservation :=( K5 H9 d5 ~) M6 G1 v. K
@.Destination.NumReservation + 1;
- s- r/ x1 x+ X4 L end;
1 |, F( l! b! R1 a0 l @.CurrIcon := "drivingHome";0 I+ f) z8 H' A0 m
@.DrivingHome := true;; J# T+ E4 i7 o* j3 p
end;
: R5 F, D6 i- O7 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 {4 T" P& m' n& u, t' W; a! k; S
part := @.transpOrder;* g4 `- n# P$ Q* R7 q) a( ] m
part.move(@);-- load part" ]( F$ x9 S% _ {, X3 m
@.CurrIcon := "load";4 H& u" x7 E$ {: g6 Z
GlobalDistObj := part.globDestination;
& e: [. o( U5 e' m) t/ |, V assignLObj := rgmanager.rgAssignL;
) H4 f8 R0 [( s row := assignLObj.getRowNo(GlobalDistObj);7 C; L6 K, s8 z* G! g
if Row = -1 then -- since 70
) k+ |3 I. n2 _+ Q if lan=1 then1 R4 \5 ?5 E& y+ u& y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 e0 ^8 F. o* a* o1 C to_str("in der Andockstation: \"",?.~.name,"\""));% u! l& |% S5 g. m
else
, A5 ]$ h# l) U# V6 k% q5 {* L, S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 {' R. D3 S6 b# E to_str("in docking station: \"",?.~.name,"\""));
. a# y2 F9 u) [ end;
, _. f( g& G9 i, Z' X0 P else8 c. n5 P$ Y4 c3 N
@.Destination := assignLObj[1,row];
* [+ n; U6 E$ D8 y* ?; u* W/ c end;
0 k# E" b4 d7 X6 v- x: }4 b+ S newDirection(@);8 E3 Q( H3 g- }4 B
@.HasOrder := true;
1 t* g! D. d- Q& M* u5 x end;
' S5 r! x7 @( A end;& G* S+ ^- V5 k$ E) f$ |
end; -- of the method
% d8 D# y( `0 G" C0 V) S |