/* called by: entrance ctrl of the object 'track'
- g$ g, A9 v! h# j6 |*/3 F, B7 P' V/ g" p6 I- S0 n3 N
is+ N9 r% a6 z% Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# C7 _7 Y) M5 E5 ^
do/ ~# y" L: ?7 U2 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;# @" }4 p6 y. n8 x& E
if current = @.Destination -- else return
+ T I" J# M! x& S& o then0 ~$ g; w% y& l" N6 T d
@.Destination := void;$ L$ v; B* m) J8 N- ~
if @.occupied then2 P# ] T" j' @
part := @.cont;
+ V7 F& U+ c' e2 l; _ @.transpOrder := void;
# ?9 w' y5 o4 {" c7 S2 V; b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; M9 i8 u4 } [' {' r/ Q @,root.eventcontroller.simTime);: p" B" G: x1 B/ J
@.HasOrder := false;) P4 c* J6 w/ [" k& N: U& U
@.DrivingHome := true;( r3 r; w1 {. R. ^5 h
rgManager.tryToStartTransOrder;/ ?# S) T1 `6 S) Z; u$ U4 W, C2 ?7 X
if @.Destination = void
! S" n- Z: O+ Q4 V! b. v then -- no transport order for vehicle @" ]7 F6 s6 g4 q1 }; ^
@.Destination :=
4 z& X) B( T5 s8 I( H" h' ?. q rgManager.nearestFreeStation(@,track.~);
6 l7 u) k( {, u0 J! C Y9 K newDirection(@);
% ^! J, s5 O# ?" h* A3 ] if @.Destination /= void then3 Y# H' ~2 l- ~% ^
@.Destination.NumReservation :=# q3 s8 ]- C8 q' ?
@.Destination.NumReservation + 1;
' f& ^2 F0 @9 X. s `, n2 Y end;* q3 S$ ~ Y( ~* U
@.CurrIcon := "drivingHome";
0 S' Y7 Y$ T& _/ I8 b4 c# k* ] @.DrivingHome := true;
8 r/ W, E2 b2 `! I% j j! X end;
6 ?' u5 P' u+ D/ c, c else -- the vehicle @ is empty, both vehicle and part are in the same dock station% q7 X( j/ Q. Y* S& a
part := @.transpOrder;
4 A- V7 w6 S2 H, T' P3 C; v) B part.move(@);-- load part |' R7 ~9 W' `% F4 }% }
@.CurrIcon := "load";
$ T9 W# [6 ?" m GlobalDistObj := part.globDestination;8 E# F ~5 J6 m
assignLObj := rgmanager.rgAssignL;
% ]2 l8 ~+ z" u N row := assignLObj.getRowNo(GlobalDistObj);
, n8 M1 ?) v% _2 A6 H# D if Row = -1 then -- since 70# b1 d$ i( v" Z
if lan=1 then$ @: N \9 N6 r$ F/ w" Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# N& @: z2 ` ^5 y8 W3 e
to_str("in der Andockstation: \"",?.~.name,"\""));
' T2 q: z0 G2 P8 c; P0 ?: p$ @# y5 D else" D% L: [3 L9 K7 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
a1 |1 {5 t( d2 l" C9 I* g. @' ]1 \2 h1 c to_str("in docking station: \"",?.~.name,"\""));
5 G5 f) T8 E6 x4 j- {9 | end;
8 Z9 g. C# k+ P9 D/ J else
. q: r- c6 Q" i3 y8 c( }7 U @.Destination := assignLObj[1,row];% {' S$ t* a4 T2 \
end;
. B0 |7 A+ a/ ~% ~: g' E- f newDirection(@);
1 D/ R% ?" e t g3 P o @.HasOrder := true;
- j) s, n) n9 Q" n. O end;
, P! e6 o, f" Z4 q5 W: r) L# _) K( c" o end;
9 p' J+ |- @4 m( [# ~+ rend; -- of the method" ^. U; j5 m& @+ E' P0 M+ s2 t$ B" w
|