/* called by: entrance ctrl of the object 'track'! X8 }3 z) y6 a# n$ G/ A$ ^
*/# ~) b* w7 d9 @3 m t
is& S n- N6 P: R0 `, F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; [" n6 _) L# Pdo
" T; Q0 _$ a7 S" |/ ^( m2 a, w Lan := rootfolder.Internal.Tools.AOLlanguage;- m. F, n+ J+ I) J0 h6 g
if current = @.Destination -- else return
m8 ~. p& \ \2 S+ W& C; Z4 x6 J0 L then
) ^ N9 P. b( l) r+ A1 m9 [% s; D# Z @.Destination := void;
5 T: |) f2 R1 s# N! Q. h: m if @.occupied then
7 m2 Z7 W V3 D* l part := @.cont;
4 g0 \6 M u6 M4 Z1 d# \; a @.transpOrder := void;
, ~ m& _" ?2 H' e, r \* w' Y6 c( W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 j" q# s! i3 ? G. p! N% x7 M
@,root.eventcontroller.simTime);% D# K7 q7 ~5 ~& y- V9 q* V& Z
@.HasOrder := false;
* \) \( ?( Y( U( x5 G$ N- t: P @.DrivingHome := true;
; _; ~5 o# e1 O& r( x: j6 P rgManager.tryToStartTransOrder;1 w3 A! l, v. K7 H* u
if @.Destination = void3 ^) h6 L) a E. g
then -- no transport order for vehicle @
/ j0 R. z% m& Z/ g& N x( U @.Destination :=
M" W/ U0 A1 }! U rgManager.nearestFreeStation(@,track.~);
3 `. X1 O+ t# ^0 g, Q newDirection(@);
& w( m: x- m1 r$ @ if @.Destination /= void then
; V$ ^, B0 y- q @.Destination.NumReservation :=3 \1 [0 `& e) N4 T1 Z% C
@.Destination.NumReservation + 1;
3 ]) |# I9 r8 x; K: {$ C" C9 g end;6 n1 R% T" D# e
@.CurrIcon := "drivingHome";+ E" X1 r3 n9 {, I
@.DrivingHome := true;. {2 f) l- m3 h
end;# L! Q. ]/ K4 \0 H0 F1 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 \5 U* f" H1 S" g& Q9 N; t
part := @.transpOrder;
# p* E& I" Y, d7 l# m4 Z/ b part.move(@);-- load part; x( B# L C2 V& ` O) ~7 \
@.CurrIcon := "load";
+ a7 J8 `& \8 }4 F. i1 a GlobalDistObj := part.globDestination;- ?4 f' c% L" [
assignLObj := rgmanager.rgAssignL;
) q! ?5 P0 `0 C2 z6 G% M2 ?# D row := assignLObj.getRowNo(GlobalDistObj);% F2 v4 s, }; [- K' v
if Row = -1 then -- since 70
; h3 i1 ]# @" ?, ~& M/ V if lan=1 then
/ _- k+ N+ ^, N# a+ f8 z) J8 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 S2 t z& E. l to_str("in der Andockstation: \"",?.~.name,"\""));
# S8 X; `8 u. B4 ]4 t. S else) W8 W0 [2 v$ I' v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 W0 C2 l7 S: z to_str("in docking station: \"",?.~.name,"\"")); * p( k8 s; B3 ^! B9 q7 Y
end;
6 j0 X2 x$ f3 F) Z( w else
& R* `, c, j; ]6 D0 y @.Destination := assignLObj[1,row];" i- @: j6 M& {0 c
end; ' [3 W/ k/ W6 g0 g6 g9 B
newDirection(@);
0 o# O4 W2 @! p. v @.HasOrder := true;* v) u& J7 K- E
end;
% L" |7 b* P" J end;2 r3 r' v3 W$ W" J7 m. }' Y
end; -- of the method
6 J- y4 L, A) n' L9 t4 D& r' g |