/* called by: entrance ctrl of the object 'track'8 Z: l, U# x w
*/) O: ~8 e1 C" U/ f4 W' a! Y8 }
is
* v6 k- `6 _3 h9 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;. f& _# I+ H; S8 J" ?7 K/ M
do; P( y/ Z) [( Y+ \/ t7 e7 j6 x% i
Lan := rootfolder.Internal.Tools.AOLlanguage;" o. k* N _/ @/ c
if current = @.Destination -- else return' ~! Q' |0 I7 y
then
( Q: F! _3 r% ^3 [* Z @.Destination := void;
5 ~' Z% U' J1 N( j7 o$ _ if @.occupied then
$ z4 [) z. F7 A! E, q4 o7 a part := @.cont;
. D& F" J4 Z2 j3 N; {2 @ @.transpOrder := void;2 `2 w/ c1 K3 `: A$ Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 K9 V, `5 A+ }6 U
@,root.eventcontroller.simTime);
, @( v! F3 T. m7 T& p- L @.HasOrder := false;0 Q2 m' d7 C/ _
@.DrivingHome := true;
+ N0 O0 v/ @6 z# m$ ? V rgManager.tryToStartTransOrder;$ X# H! s/ @) X L9 l
if @.Destination = void5 p- D, a) J5 }6 ~
then -- no transport order for vehicle @ B+ X- K: w, M
@.Destination :=" n0 Q, H8 J Z2 p. P$ x
rgManager.nearestFreeStation(@,track.~);7 ^* |' A, m3 `8 i: A
newDirection(@); 7 b8 V& t7 v( w+ p Q
if @.Destination /= void then
$ k1 B$ @6 s, b0 p @.Destination.NumReservation :=
6 _( k" K9 e! H) Y5 [" [8 P @.Destination.NumReservation + 1;
G3 F. Y/ `4 K: u, a end;, Y& p5 [2 X+ S' u* V y" [
@.CurrIcon := "drivingHome";
" f( e6 @% ^; v( [. n @.DrivingHome := true;
3 q Q8 }/ d; m6 K. T end;
2 x7 D3 ]3 u! p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 `+ z: ?+ Y/ |9 l1 D2 O part := @.transpOrder;8 P% F$ C% q6 H+ @+ s5 F
part.move(@);-- load part
|8 P* r% N0 ^ D7 e @.CurrIcon := "load";
4 f) \1 J* P; f& _0 ^2 }" ^ GlobalDistObj := part.globDestination;
0 o+ t- h/ u$ S/ h" M$ p3 v assignLObj := rgmanager.rgAssignL;
. i; t2 ?/ f5 \ row := assignLObj.getRowNo(GlobalDistObj);0 Q, U* K1 t; F9 G
if Row = -1 then -- since 70 m5 q4 S$ p5 C1 P. {; y# ]
if lan=1 then
. r1 d! ^ S( b7 a8 t) ^5 w: o$ j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% {* o8 i! g2 n5 f* D
to_str("in der Andockstation: \"",?.~.name,"\""));
7 C9 g+ @$ e0 b/ G else2 R+ y8 ?0 {9 f6 D F1 s& M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 y0 _7 }2 E8 G: J6 q
to_str("in docking station: \"",?.~.name,"\""));
]( m1 \! q( Q1 W; n end;
0 b- b2 N. S- x else
- Z4 u, `- c% w, a8 x- h0 t @.Destination := assignLObj[1,row];5 y3 N3 g! M4 d8 ~# h* l7 `0 ?1 ^6 h
end;
! @7 K. m& |+ e) T0 k/ d newDirection(@);/ x/ A% p' j* G8 p( }, K6 X
@.HasOrder := true;) K9 m/ |: ?. t0 u' l
end;7 n- @2 ], ^4 I- f4 @- V. F1 q
end;6 \9 j% ?8 a7 j& \% K, c
end; -- of the method( K$ N- f6 F/ p( S3 t2 S
|