/* called by: entrance ctrl of the object 'track'
" M/ G3 o/ O% {& b3 a7 j% T" i3 w2 \; M* w*/
( m# j) K9 G, I" @+ j9 y4 t5 `is
; o7 \' n" q4 d4 [( M/ z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# p% ]% w/ n& ~' F0 b( ^do7 T: U' G/ K% N" m
Lan := rootfolder.Internal.Tools.AOLlanguage;
& ^. K* d8 Z. g% S3 E% W' Y if current = @.Destination -- else return% l0 r a1 K4 s' V- m' O" D; ^1 a
then
0 r9 Z5 J( h' i& K7 I @.Destination := void;7 A' i: n# \+ v- x% v
if @.occupied then
9 V" @8 q [' _3 p part := @.cont;, x1 S6 O) N& {6 z( F% O0 g
@.transpOrder := void; T+ i4 v# j$ R3 W( A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Z+ C) Z/ g/ f, A( g
@,root.eventcontroller.simTime);, X4 ?% v4 ~0 y- ?% x, |
@.HasOrder := false;
! U- j! p/ ~( x @.DrivingHome := true;" w/ L, u/ j5 Y0 z/ k
rgManager.tryToStartTransOrder;+ {5 y# o; F5 a8 } c8 V: w
if @.Destination = void7 _. |3 K% I0 O& o$ w( L: Y
then -- no transport order for vehicle @
6 H. x8 ~ ^# p1 F, C# x! u; `* b @.Destination :=
' ?. m, K5 e# \4 _3 q$ b5 H rgManager.nearestFreeStation(@,track.~);
7 i9 s) o4 w4 {% D: G newDirection(@); 4 }% a, u/ u9 _* m
if @.Destination /= void then% i- I' ?& a9 I( q5 G
@.Destination.NumReservation :=. V3 Y' I' V5 b: l3 f5 e
@.Destination.NumReservation + 1;
% s* Z! G5 z1 I2 C/ o x W end;: ?& e8 Y; ~* F
@.CurrIcon := "drivingHome";
% I" T- s& U' G$ K& c @.DrivingHome := true;
$ J/ [2 v2 M( `9 P9 [6 ]7 x- p end;9 k" r2 w. X0 c( ^8 p' M1 z+ _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ^# N0 D* p: [8 ^ part := @.transpOrder;
5 l6 E+ C9 D5 I part.move(@);-- load part
0 d6 i0 a. i# K3 u- c @.CurrIcon := "load";+ c( N& {9 o6 _# G: m' D, d" a: ~
GlobalDistObj := part.globDestination;
9 p9 p# K5 a* ?" h/ b! p/ N/ E% A assignLObj := rgmanager.rgAssignL;
9 K5 l6 M. z+ i* b# z% Z3 o row := assignLObj.getRowNo(GlobalDistObj);' m X4 U4 R& t) }1 a9 t
if Row = -1 then -- since 70
G$ j% }% B0 I( d( p if lan=1 then3 W3 s: h0 G# G$ J# w9 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 G. K, P9 I. H7 X" A: b3 p
to_str("in der Andockstation: \"",?.~.name,"\""));
& {5 ?/ E& l$ P# Y else
3 l( E$ F+ r! W% D ^2 D) L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Z/ T) |* @: L: y. p8 U
to_str("in docking station: \"",?.~.name,"\"")); % I5 J7 \0 n' w
end;$ E6 F/ O- S) t/ Z4 P
else% b* Z1 W0 l& q2 I3 A
@.Destination := assignLObj[1,row];
( K- G! I) c, r0 \9 K/ P end;
0 H; F7 R5 P% ~ newDirection(@);
; H' J+ F* a: Z8 T; w' @ @.HasOrder := true;
5 v' p% D1 l) Y2 B7 A7 m9 }+ q$ m end;! J6 N$ W+ ]" \) Q' ~
end;0 ]' [8 X& x3 n. A
end; -- of the method
`5 |3 b$ m) f! F |