/* called by: entrance ctrl of the object 'track'9 _0 J2 e: E+ e4 P: Z+ C/ M6 |
*/9 ^0 c- d. J7 y3 b
is4 r A- |" w! V/ p9 m& a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 a& t0 Q& f( X0 n( A
do
4 B7 p, V3 ~* L8 Q Lan := rootfolder.Internal.Tools.AOLlanguage;! X& V* U, i# u) V# [2 A
if current = @.Destination -- else return8 Q7 z0 `) B8 r' G3 [0 X9 Z2 B3 w# y& {
then3 ^4 D/ Q. ~' O$ }. J
@.Destination := void;
% H7 R, g2 p( w9 W if @.occupied then3 [# x ?( X* Z
part := @.cont;
/ }' g! g; L1 {& q9 X @.transpOrder := void;8 t0 I; ^. m7 t8 {0 w6 Y: i/ ^7 c; a7 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 C- V. w, i* D) l
@,root.eventcontroller.simTime);
5 G0 X% R% [8 Q+ Z0 s @.HasOrder := false;! [0 T! R- }: B8 A9 S
@.DrivingHome := true;
% E' o- C2 q4 q$ \ rgManager.tryToStartTransOrder;. R" T. d& i" P7 ~- L* q& Z
if @.Destination = void, x2 n% p& \9 V/ @& O1 h
then -- no transport order for vehicle @
3 X$ Z/ V' H$ f8 o8 u @.Destination :=2 G) m, d/ k9 `5 H- s
rgManager.nearestFreeStation(@,track.~);* o& `& ^/ o. t/ H" y2 G2 X
newDirection(@); ; N. B7 N; f0 ^6 @
if @.Destination /= void then6 g& H" G9 S* ], z" x* |- Y
@.Destination.NumReservation :=8 K" u; \1 n: Q2 Y+ r2 p7 S
@.Destination.NumReservation + 1;
" ]/ y9 `& i, K. ~7 V/ O4 v end;- Z7 Z6 e K" ^+ r L9 o
@.CurrIcon := "drivingHome";
9 L2 ?/ h9 @& ~ @.DrivingHome := true;3 I! |: X! {; u! A% ?
end;2 ~& N+ |) c p1 H+ c: q3 r8 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) C, h& u o& @" @ I part := @.transpOrder;+ R4 z0 Q. `* w, C+ L
part.move(@);-- load part0 ?4 `" D. O* h7 z0 R& q; @3 T
@.CurrIcon := "load";# k% j9 J) b% v/ l1 c
GlobalDistObj := part.globDestination;( w6 o: h7 v6 i& ~' d
assignLObj := rgmanager.rgAssignL;
1 Y3 p l9 x/ b3 }8 i% U$ _# u row := assignLObj.getRowNo(GlobalDistObj);
) R; d4 B4 A9 ?: R5 k4 ], j/ D if Row = -1 then -- since 70
2 Y6 J4 r+ S/ N3 p+ T6 I$ P( k- {! C if lan=1 then* P1 b1 E, }* W& l2 k# y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# m/ u: p8 }( ? to_str("in der Andockstation: \"",?.~.name,"\""));! f9 Q* f4 R: \! e& y
else
" m \ y6 E: e/ g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ?# D2 H: Z6 d$ } to_str("in docking station: \"",?.~.name,"\""));
: ]! \- B0 o: X end;
' `! j8 L6 h ] else
7 s1 {# c+ t' t& r) c @.Destination := assignLObj[1,row];
' Y& Q# f% [! j8 f; x6 _* S end; - f! ?( [; X- k" a# y* L7 j0 c& C8 G
newDirection(@);8 [' Z' T7 s% G6 ?1 O/ e" C
@.HasOrder := true;
# }* L# [8 S0 S9 } end;
, L' @+ }6 Q0 f. m; J0 S8 z end;
6 z9 e- N' T8 l5 d% Z lend; -- of the method
7 B) b* e# A. @- o |