/* called by: entrance ctrl of the object 'track'
9 ~! f( I2 E* E9 f6 n8 q, a9 ?. u( I; v/ ]*/3 G" w: `2 P$ W6 q8 {
is! U m6 t/ B, L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 w0 y1 a6 ]& x: E: v
do( y4 Q( l: j% X+ ]: q
Lan := rootfolder.Internal.Tools.AOLlanguage;
- E1 ^- B- z, f- g% x, z' I if current = @.Destination -- else return0 f+ p0 N' M9 J) d+ y
then/ G/ \4 }0 J* ~/ J0 h7 ?9 j
@.Destination := void;
! N8 L& _. f; Q* N if @.occupied then
% {1 U5 J! `) u part := @.cont;
% _ m' P _/ c/ b @.transpOrder := void;8 d2 B9 u7 c$ F, q$ d* Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, q6 O N4 A B& ?2 U
@,root.eventcontroller.simTime);
1 v) h% ~9 `4 e: {1 g [! U# R% y @.HasOrder := false;
& j$ r( o" F8 i V( a+ U @.DrivingHome := true;8 ~3 H0 D( j$ A. o
rgManager.tryToStartTransOrder; m- }, J: U8 h2 ?
if @.Destination = void
& I* p" n$ H, {+ v0 I3 O0 R) ?# B a4 G then -- no transport order for vehicle @! h) m; F7 j* H0 t8 ^
@.Destination :=4 X+ ]* o# V8 U) S
rgManager.nearestFreeStation(@,track.~);( m* Y6 v6 w2 F! h( u
newDirection(@); 4 r# \* y* J/ |' a# y: Q8 j
if @.Destination /= void then, r* w+ q0 q8 U3 h% H$ E
@.Destination.NumReservation :=. `& o6 Y) R; l- i- B w) A& u
@.Destination.NumReservation + 1;: w1 M8 Y2 O# C# }+ z
end;1 @0 G& V: }( [7 q- V% y5 @
@.CurrIcon := "drivingHome";
4 g) l6 i5 A2 V$ C t @.DrivingHome := true;
. O0 h( p# u( W- V) ^* c' F end;' X3 F: _! z/ ?2 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, {( J& B- A5 n9 B; W% M1 S: m part := @.transpOrder;& f K. j+ d6 r- m% ]7 Z
part.move(@);-- load part
: f* N% D- u8 t" ^1 D/ d @.CurrIcon := "load";( e. A/ m& d0 c) A6 A
GlobalDistObj := part.globDestination;6 p! q& i+ S9 b8 ^4 }" d
assignLObj := rgmanager.rgAssignL;$ _; Z6 @# }$ [' v7 \% B9 C
row := assignLObj.getRowNo(GlobalDistObj);
' g+ { O' F/ v# V6 n- c6 f if Row = -1 then -- since 70- j5 Y: Z: O+ `0 G
if lan=1 then
$ k' d: L3 T% k3 I) [: m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, T2 ~" |. o* H to_str("in der Andockstation: \"",?.~.name,"\""));3 M' @- C, @' ?) n( k
else; E+ ]! c+ b5 t) u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! Z. q9 N, c! e: j: S* S
to_str("in docking station: \"",?.~.name,"\""));
+ p; ?5 Q4 P* b' b3 j* ?; S+ n" e end;
) Y; i. V- |+ F8 a$ M. w% t* \" C else0 r" p5 H4 J8 O) I9 ~3 _, T
@.Destination := assignLObj[1,row];6 m3 w' K6 `0 d$ L6 N: J
end;
! K6 U. I4 @, L( ] newDirection(@);
! S" m J. Z& b' ?9 x4 o: g/ Z @.HasOrder := true;
$ _+ o7 J: `; H6 t: r4 Y4 a end;* \2 [3 P' _( s
end;9 H: p4 w6 ]& i4 h5 b! a
end; -- of the method
1 k8 |2 D9 d+ m# a1 n |