/* called by: entrance ctrl of the object 'track'+ [5 R/ }$ G4 i! e& Q, ^
*/& o; i# N% y7 E! o
is2 Q! F* z3 `3 {+ L* J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 e$ F: v; S! T( [& V) N; x
do7 S- W, B5 C4 ?7 [1 ]/ u3 |
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 h' `7 u( _; L% K+ Y7 Y( s if current = @.Destination -- else return4 ?. T }4 @; w7 K
then
' B" T5 ?- D( I" F7 g @.Destination := void;. f; l2 a: ]4 v: O0 H; y+ [% j# N
if @.occupied then, j0 Z6 v6 }7 w: e# G. w. M4 ~
part := @.cont;
. n2 X& a0 X- O3 B) |* h+ \' J' C @.transpOrder := void;
; W# S- h% W* c2 b- r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ a4 l( X2 x9 O- I5 j @,root.eventcontroller.simTime);2 h% b* m& i* _- N- _
@.HasOrder := false;( ?: b9 V+ {( H E+ R
@.DrivingHome := true;
1 C6 R5 {- z2 Y" M rgManager.tryToStartTransOrder;5 ?( m. Z/ i @) K
if @.Destination = void1 |2 `0 t$ i1 J+ N0 p& z
then -- no transport order for vehicle @
* \5 S" M1 n5 A+ `/ [' \% N6 i @.Destination :=4 v8 ~$ S/ |4 g1 t
rgManager.nearestFreeStation(@,track.~);
1 r3 {2 `- c# t8 T newDirection(@); ! f. {, [/ W+ d
if @.Destination /= void then
& ~( a0 ?: ^: E( q @.Destination.NumReservation :=
& o( D9 v. t! m1 O( A! n$ R% M* A @.Destination.NumReservation + 1;. |0 _$ O k2 B P( c" k4 O; [3 \
end;
9 y; L/ F5 w( t6 R' X+ {4 f @.CurrIcon := "drivingHome";
3 {' Q" ?) ]. U @.DrivingHome := true;0 @1 @( u3 O0 F/ U! n+ U0 Y3 n
end;7 j5 E+ b8 q' a4 |* ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' k2 |9 _ b) y3 F; p
part := @.transpOrder;
~' i6 p7 W/ U8 y2 {' \ part.move(@);-- load part! X/ m* K+ E6 a/ n
@.CurrIcon := "load";2 t+ m; c0 ^$ Y' S/ ?# M- {1 R- e# ]
GlobalDistObj := part.globDestination;4 m, o- W1 \* U6 i/ O' ~
assignLObj := rgmanager.rgAssignL;
6 v. \2 |% o" g! Y6 M: u row := assignLObj.getRowNo(GlobalDistObj);3 r; W+ W5 N; X0 \6 ^5 F
if Row = -1 then -- since 700 ?' i4 D' _6 Q0 g+ k3 I3 K; ~
if lan=1 then/ r& g* d3 D8 y1 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 q k- y% c% O( h) r& N
to_str("in der Andockstation: \"",?.~.name,"\""));2 K# k: l1 D' a' y
else
: U5 E* G4 L+ T* Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. Z* |: M* H4 J q0 O$ B0 j2 B
to_str("in docking station: \"",?.~.name,"\""));
1 ^) [$ }& r# k5 b* k end;
+ v$ O0 i$ Y% q0 h" y; x8 |- M' a else2 _, [( j2 M: @2 |
@.Destination := assignLObj[1,row];) `$ g! f* g, B, p, N' ?0 e3 A
end; + V& d( M5 K s% H+ }
newDirection(@);
* G/ y2 O' O4 {% |1 \ @.HasOrder := true;9 Q5 C) W6 s8 J O7 t5 Q
end;
7 g! p2 ?8 ^ }! } end;! k5 Z% p, Q, F3 R) R
end; -- of the method
( G' q8 n* N- ]' { |