/* called by: entrance ctrl of the object 'track'
( r1 R$ \' A* c- }% r$ ~4 [*/! C$ X% m- m9 M6 g
is
; j2 S: d# C: v$ }5 Y3 v, R/ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ e) ~3 @" {- l6 e( t: r
do( }- Z" [0 a* Z0 ]) v* ~$ E
Lan := rootfolder.Internal.Tools.AOLlanguage;3 P8 d, B2 O( h- ^: F
if current = @.Destination -- else return2 M! n3 W$ [7 C# X
then* Y( b7 [: N, T5 h W
@.Destination := void;! L; b2 ~8 ^- C3 W7 h
if @.occupied then
4 _$ ~0 Z; r- C& v& i* W/ g$ X) t part := @.cont;
( }" }+ s9 R6 x$ a8 ]* g: w @.transpOrder := void;& F/ Y& ]8 Y: d6 q( ^1 S5 Z/ f) r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' g% b( `& H+ [9 Q* Y' a
@,root.eventcontroller.simTime);5 h3 B @6 ^6 a# j4 U' W
@.HasOrder := false;
) O c& f9 {! E7 \1 W @.DrivingHome := true;
! Z. R& Y9 \4 I rgManager.tryToStartTransOrder;
8 E) F o! J3 O) r if @.Destination = void
, o. i4 e0 l' m0 b0 e then -- no transport order for vehicle @
3 x2 ^: ]( b* p" z& _ @.Destination :=
$ f9 X `7 w1 O0 Z! b' F2 `) ^ rgManager.nearestFreeStation(@,track.~);) \' [$ R7 |1 q/ V" T
newDirection(@);
7 f$ [ F: N) ^0 l$ c+ V- Y if @.Destination /= void then. S3 t" `0 m* J- V
@.Destination.NumReservation :=( e6 N% b, Z1 i
@.Destination.NumReservation + 1;7 f0 S4 R, C. l5 q4 A& z/ l
end;
1 d2 t2 k, r& h @.CurrIcon := "drivingHome";& `/ G0 n0 @" T0 I: D4 I
@.DrivingHome := true;/ a' M( ?" y5 q( W i
end;
% I( f' c0 h" S3 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: W; P- T0 c& j8 i7 j part := @.transpOrder;3 L: M0 N8 O0 m3 t
part.move(@);-- load part
7 p: T- r0 p4 R' H$ { @.CurrIcon := "load";! }1 @. C% X7 ~
GlobalDistObj := part.globDestination;) B& @7 a& `1 ^( d
assignLObj := rgmanager.rgAssignL;
6 f, k9 z1 w! F' N! v, Q' N. ^ row := assignLObj.getRowNo(GlobalDistObj);
6 x0 f+ c2 @: y3 k' R" P+ c if Row = -1 then -- since 70
7 L2 n( a6 X h3 n: `- u! _ if lan=1 then5 M* ?8 p+ d* m5 I. o1 f5 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 g3 I7 T, o: u; a
to_str("in der Andockstation: \"",?.~.name,"\""));2 o, c; N8 P( K5 {
else; q3 w4 {! P! Z. |8 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 l f, @0 {0 ~! F- X+ ~ to_str("in docking station: \"",?.~.name,"\""));
5 l0 K: j: U% {0 j/ F( }/ {) X& ? end;5 D+ y2 k0 w3 T; y1 F
else* s/ ~" A: ?$ s, A9 T% ?- g3 }% D* H
@.Destination := assignLObj[1,row];
4 R& f- S; Q8 q4 M5 ^; F end; n+ V8 C: S" D* {/ w
newDirection(@);
& k$ c' d T. k9 r @.HasOrder := true;
/ J/ }3 Q5 B/ [& w* M" O end;
z1 B6 g) R8 J3 t: v& o end;
, W* }2 N' L) G. k, V; aend; -- of the method
! C( @. ~5 s/ O& u# l |