/* called by: entrance ctrl of the object 'track'
- b7 @; V- X* {8 N; Q: f6 ^9 t; Z. V*/7 m: c7 \, Q3 E( z
is V9 P3 r; q& B+ h) r3 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 l" @* f" o" h5 j
do3 I% {9 D2 n$ T# A, `0 E- T
Lan := rootfolder.Internal.Tools.AOLlanguage;0 u- \+ T% P5 ~/ W8 k6 e
if current = @.Destination -- else return4 H+ N4 w3 t7 a7 }0 k9 y
then
; i, W9 K" Q' p* l+ j5 s6 s @.Destination := void;
5 a( K1 C* \0 @; |& A) l if @.occupied then
: U+ p) W8 [7 q: \- f part := @.cont;( D/ x9 I" h- x! Y+ Y5 S
@.transpOrder := void;
( D9 g) y2 p" Q" W2 Y- m. c2 s% M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 z' S# R* H+ r9 z( y/ \
@,root.eventcontroller.simTime);3 O- B/ u o) w& N- | w
@.HasOrder := false;$ G1 E* S+ } @2 c$ ?
@.DrivingHome := true;, r( a% z/ O4 J* ]7 N+ A. I
rgManager.tryToStartTransOrder;# V4 r" L& z1 ]( l7 B; j
if @.Destination = void
5 b: }4 d3 Y' k then -- no transport order for vehicle @& m" j7 }) O/ Q' z- d. }6 j! [
@.Destination :=
' q; @. p$ Y3 x8 X rgManager.nearestFreeStation(@,track.~);
) X# u! L2 m0 v3 H4 | newDirection(@); 7 g3 b4 a' Q4 r
if @.Destination /= void then1 M& E+ Q3 u8 Z! j; Z' i
@.Destination.NumReservation :=
2 A; U: `% B4 W, G" E2 `8 Y @.Destination.NumReservation + 1;
8 a, |) _: B( i end;5 }) Y& j0 h9 m I6 r i% R0 O% s, B
@.CurrIcon := "drivingHome";
$ J: ?$ a4 M, C s6 F @.DrivingHome := true;
( f* T9 [2 f7 h" O end;, n% q, R3 g- w$ f# Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 N0 h# Z: @' l, n" V
part := @.transpOrder;
' s. I& G" [9 l2 z, h part.move(@);-- load part9 f: T, {5 I1 U% |0 f
@.CurrIcon := "load";
0 B, J* w. } D$ S; n GlobalDistObj := part.globDestination;
1 J4 i8 c# O0 h" E) z assignLObj := rgmanager.rgAssignL;4 i0 U `9 d, Z: Q2 y4 Q- i5 y
row := assignLObj.getRowNo(GlobalDistObj);
& n3 O; y4 d+ @6 x if Row = -1 then -- since 70& e4 m+ {! G' a1 y' @+ @
if lan=1 then6 t- U% x7 ]& n$ Y' f. [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 r$ Q5 ^+ Y1 V" G+ l to_str("in der Andockstation: \"",?.~.name,"\""));
7 M4 ]) }# ^+ _2 E else
: D( I' b. [4 a6 D+ z5 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 K+ Y" A2 {) ^! Y# D5 L3 g( m
to_str("in docking station: \"",?.~.name,"\"")); 6 f5 e5 _* Y. F
end;! Z9 R% a( L n
else
# h5 M; w& j) g5 }' a0 q @.Destination := assignLObj[1,row];
: _1 H0 Q; t% s7 l$ k( f end; " {( ]2 }& c& Y1 \ f5 S1 T. ?( E
newDirection(@);* C6 v6 k- r, [9 e2 T+ k# k
@.HasOrder := true;8 p0 Q2 [! B" z6 d- I" ^; k2 f
end;
5 g2 s5 U7 n8 |5 W) T end;
. q. \" h( ~3 d* gend; -- of the method
% U! I" n4 [0 W9 @ |