/* called by: entrance ctrl of the object 'track'
, j# D: r/ G: U4 a: i*/
% Z6 \- F" N% c+ A# W7 uis
8 x% M' m. ^) d part, GlobalDistObj, assignLObj:object;row,Lan:integer;; e+ {! }2 ~) U$ _
do( Y5 h" J0 I6 J, Y1 t( X! K! i: Y' q
Lan := rootfolder.Internal.Tools.AOLlanguage;+ E1 ^/ I8 P# g/ o/ N, i
if current = @.Destination -- else return
6 m7 l! w* ]# \9 ], j/ [ then
" H3 s8 B9 M$ [/ n% q" B( F @.Destination := void;* T% n2 ~- J, \* r u e
if @.occupied then9 K6 C+ p- G5 ^" |6 f, ?
part := @.cont;
3 i; p. k) x. O+ n3 x @.transpOrder := void;
! {+ h0 i' \8 e* [+ H8 ]4 r6 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! b" Q) y+ c7 _* f5 C8 W
@,root.eventcontroller.simTime);4 M: e4 K" \* \# r4 |: B7 M0 v3 r
@.HasOrder := false;
j6 d& d" D d8 m; U. a @.DrivingHome := true;
) e! r) u, [0 ]" ~ rgManager.tryToStartTransOrder;
* ^5 ~+ a' I% U0 X if @.Destination = void- o. Q) a- R8 O4 R) @
then -- no transport order for vehicle @
4 j$ z; \: g5 E/ A) u% Q @.Destination :=
7 u& i4 \. g" k* x e3 ^ rgManager.nearestFreeStation(@,track.~);9 t# y P1 @4 B _2 y5 e
newDirection(@); 8 g9 [' L/ ~* X# T$ s* c5 c, k
if @.Destination /= void then
& O8 @; _! ^0 {7 {- B @.Destination.NumReservation :=/ A0 p; _+ T7 r5 }; X& d
@.Destination.NumReservation + 1;0 U! ^3 G" }! Z! `" u
end;& s ?6 @" J2 B1 F- l% x
@.CurrIcon := "drivingHome";
: d" h4 c2 ~# o @.DrivingHome := true;3 S {/ b5 i) Z6 }- r
end;
: `' X' N6 ~. C6 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 \( `9 X1 f( \/ p6 L5 c
part := @.transpOrder;
4 y. w+ c4 F' y part.move(@);-- load part) x& `: y# g% f2 c, b# V3 D
@.CurrIcon := "load";) _" m5 i6 ?& ?& x0 F6 Y d( J
GlobalDistObj := part.globDestination;
0 H, N- U; N& Q: Y$ Z! s2 ~ assignLObj := rgmanager.rgAssignL;
0 L6 |! t0 b. q# \* Q2 C; Z5 G row := assignLObj.getRowNo(GlobalDistObj);
: U7 {8 H* C' @, M# D* o- V if Row = -1 then -- since 70
9 H8 w* ~% k) w: s7 ]) P/ C if lan=1 then
& h0 A5 [+ M$ R$ s5 l* m a$ h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ x4 }9 K% u7 c% L7 p2 Y# \
to_str("in der Andockstation: \"",?.~.name,"\""));
F! X( e/ ^ X+ R2 \4 M( l4 w0 t; r# { else
1 y8 i$ v! o' x6 t! S' @4 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 s; \. `1 @7 P7 e8 D! A. i% v- T to_str("in docking station: \"",?.~.name,"\"")); 8 h- E D) b4 s+ n! U
end;! F! l$ _' s0 C$ ~5 f1 p& |! D5 @* l
else% d4 m4 X0 R' P# Z
@.Destination := assignLObj[1,row];
: q& V6 J3 w% \. K! s' }7 ` s4 ? end; 8 j: b. |& J0 ^# T. h9 a+ e
newDirection(@);
6 d1 J5 c, @2 J0 y# x* u @.HasOrder := true;% J% s6 K- J; @: G( m9 ` Y
end;+ M" U; a0 g7 G8 u. I$ x. _
end;1 G) U3 y! `. k8 D5 B. t
end; -- of the method( e, ^8 d1 r2 `2 i: O* O) T( H
|