/* called by: entrance ctrl of the object 'track'8 \/ r j8 u2 \( N9 _
*/. f9 c/ v% P# x# p Q* v
is
& f7 N8 o0 D8 r3 @" \1 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" L; w+ @+ X7 e) u( M- X& I) }do4 N E3 z0 Y% ~3 W; i) S( `/ @
Lan := rootfolder.Internal.Tools.AOLlanguage;
) B' Q8 t: I: e if current = @.Destination -- else return7 K# |1 k' X' `1 ?' J& j
then- e" E. A" w$ g0 c; T
@.Destination := void;
5 j/ I: @4 O8 }; _/ [$ t3 j if @.occupied then$ i1 @, d0 i p0 u; A9 z
part := @.cont;
- l0 W4 ^$ r9 s" h: J/ i: P @.transpOrder := void;) r( \2 t6 S1 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 I, n7 D- W' W8 V @,root.eventcontroller.simTime);: z: p V$ q n) i
@.HasOrder := false;
9 p) U+ q$ L- E @.DrivingHome := true;
# y* Y7 z1 N+ U, s2 W rgManager.tryToStartTransOrder;6 H& }4 S2 C X
if @.Destination = void0 R2 j+ x2 F2 M0 s( O/ l
then -- no transport order for vehicle @" b9 ^8 f% \6 d7 {# T3 i
@.Destination :=$ \9 o/ C4 M- \# U- I4 P
rgManager.nearestFreeStation(@,track.~);% s! t% P7 E L v
newDirection(@); 1 ^1 O3 E$ c9 s0 J; j
if @.Destination /= void then3 O; T z# R, m% p
@.Destination.NumReservation :=5 Q3 D) z1 \+ ]- L/ u w
@.Destination.NumReservation + 1;
7 n1 ^2 {# @; f V5 p- j* v end;3 D) v& f4 K9 P; t! h
@.CurrIcon := "drivingHome";
2 U3 l8 |# m6 {6 w @.DrivingHome := true;
; }: A, L$ w. ~2 ? end;: Y3 g0 F8 y* ?, P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( i$ C6 A1 w* ^& J$ p6 g
part := @.transpOrder;# p6 ]' K6 G$ e
part.move(@);-- load part, @/ I8 t( t7 z" T1 R1 S
@.CurrIcon := "load";% G6 O- a3 I$ `* H6 h" l8 a1 t
GlobalDistObj := part.globDestination;: e* E% J% F {9 n ~/ |
assignLObj := rgmanager.rgAssignL;
. X$ D3 b# @* T- R- l" @ row := assignLObj.getRowNo(GlobalDistObj);
' l! p, f! n; Q( [ if Row = -1 then -- since 70; D7 ^* `; G! ?3 c1 Y
if lan=1 then) y& `; N) Q% I1 C% X8 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: w7 w! i% ?0 I L _# b+ I to_str("in der Andockstation: \"",?.~.name,"\""));/ N/ S4 D- t q9 O) A# i( W% w
else1 X! M9 f, j2 ?' L+ @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 } X5 M( \+ F4 }; ?
to_str("in docking station: \"",?.~.name,"\"")); % |9 j0 I) h5 N+ h. C; v
end;
9 N; ]0 J# |; q( U else: ?2 b X2 K( Z/ I7 n+ `. s1 y
@.Destination := assignLObj[1,row];
8 K- t1 j6 ]0 Y6 h( W R6 P end;
% c/ E$ I8 U `! l newDirection(@);
4 B, P7 ?& X) X2 H7 ]( d! ? @.HasOrder := true;
! C* ^, R2 p# o7 @1 { end;- [( X" O9 W/ U4 [( z' k) s
end;
. f% E* I. {! F8 m4 jend; -- of the method, v9 H$ w+ W5 i
|