/* called by: entrance ctrl of the object 'track': j; ^3 M: `3 @- f' C! R
*/
' e: V) `. i- Z9 Q! w# y2 C& Gis
- \2 b( O4 X# l* | part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ^9 ^: b9 S$ ^1 [+ @
do
; U: h0 k2 h D6 v" | Lan := rootfolder.Internal.Tools.AOLlanguage;
/ }8 F+ X) p9 M3 y7 y) Y$ @9 e if current = @.Destination -- else return
/ w! B0 V9 o( B8 h) R then
$ y6 A! b! e y& Q @.Destination := void;
2 E) P; X( O: S/ I if @.occupied then
3 O" \0 f$ H- A) C7 J0 }, F part := @.cont;
) D! o6 s( S; q$ I, R @.transpOrder := void;& z' o1 n+ m# }0 Z0 u6 N3 e! n8 x, a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 d7 Y; j4 ?; t1 {" {* a) a @,root.eventcontroller.simTime);
6 K, `# `8 A+ i @.HasOrder := false;- K. q# b" ?0 [' y" @6 S
@.DrivingHome := true;
6 ]( M" y! J- U3 ` rgManager.tryToStartTransOrder;
2 {3 a+ I9 R7 Z if @.Destination = void
) @! M* @, W2 d! w; U5 @ then -- no transport order for vehicle @- n8 D& ?/ S4 i/ [
@.Destination :=1 F/ x) x3 S% _( Q
rgManager.nearestFreeStation(@,track.~);/ Q8 ~: \3 B0 [$ U
newDirection(@); 6 M- m+ v( O) E: A
if @.Destination /= void then7 C ?" V! K# z4 N
@.Destination.NumReservation :=
6 K$ l( G( B! L @.Destination.NumReservation + 1;
: S! b: J( W+ u6 d end;
& w' m! ]) s( }, L4 M+ u3 H; w4 A# ` @.CurrIcon := "drivingHome";( U& H2 K. I, [9 Q
@.DrivingHome := true;8 }, L$ Y* ~3 [; O
end;
3 J! m l8 C* p: ]2 L6 i7 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p' O4 e6 Y& n- _1 |# D& p* \& R' p part := @.transpOrder;
( y: |6 o% Y$ B2 c, Z part.move(@);-- load part
- K8 y7 y; Q4 n" `* I# ^' ]6 ` @.CurrIcon := "load";
- y) z5 O0 ?' ]2 }& r. d GlobalDistObj := part.globDestination;
" t- ^! d7 X! W1 f* U* u assignLObj := rgmanager.rgAssignL;& ~/ b4 [2 s" @/ e2 O+ a% f
row := assignLObj.getRowNo(GlobalDistObj);
1 H7 [* s4 ^0 {$ P9 n if Row = -1 then -- since 70
- V: q7 Q9 F0 m+ v/ s if lan=1 then
' X- H+ m2 F0 H' W' e! Y- } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f3 @3 z$ W6 ^& F& [# t X to_str("in der Andockstation: \"",?.~.name,"\""));
! b* d3 x) \* \) v" H: L% a+ d else
3 F" G5 Y) I& d: Q' G Y' F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ T; ~+ k; P* U. |; z n1 Y4 T
to_str("in docking station: \"",?.~.name,"\""));
$ o3 ?; j; B, A) L8 P# q9 B1 I end;' M2 F h% J' F2 W. s
else
- g4 P5 i0 R, r" y+ J @.Destination := assignLObj[1,row];9 ^4 c" Q" d. A* }+ l! [$ s+ ^
end;
/ g) i" J9 K& q newDirection(@);. t4 d6 D9 l. T2 @0 \! g
@.HasOrder := true;
: A" f3 |6 z! m* H7 @% I end;
4 B4 O7 n: x3 x0 A8 g- q _$ l end;
$ ^, _) U/ `8 ]# s5 aend; -- of the method' b4 X3 D9 X" p7 F# @2 L/ c+ w
|