/* called by: entrance ctrl of the object 'track'- f+ W3 w/ D& N8 a
*/* |2 Y! c( ]; M3 q( U
is
3 A: r; _7 C* c# o, G3 M! { part, GlobalDistObj, assignLObj:object;row,Lan:integer;% V. [0 O' E/ [# Z B
do
& }4 G" b; p; N: N J* \) E Lan := rootfolder.Internal.Tools.AOLlanguage;
' Q& n8 o; N, T d; z; m: { if current = @.Destination -- else return+ A b! H6 J2 I2 V' v5 ?9 w
then/ N4 X& }$ X2 x, @1 O7 Y9 P# S
@.Destination := void;7 w! R9 o5 ^- M
if @.occupied then
: J+ ?0 q" j- @+ {2 z part := @.cont;
9 M3 i$ n* I1 w3 g, U+ A8 z @.transpOrder := void;
& h; o8 O7 H% j& H; N5 { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 B+ {0 V3 q! ]' |+ L7 U2 \8 I
@,root.eventcontroller.simTime);, l) N$ i0 |1 t
@.HasOrder := false;
5 N$ ?1 {& n# p. ^5 `- {7 Z: j. A @.DrivingHome := true;& ]; R- s3 J" m5 I
rgManager.tryToStartTransOrder;( D* `- u+ Y. Y* x/ q- T+ c7 u
if @.Destination = void
& j e' `- H* v: c0 h then -- no transport order for vehicle @; ~1 v6 l+ K6 C. n4 w
@.Destination :=- k1 y2 j; Y1 l9 I6 f
rgManager.nearestFreeStation(@,track.~);# @$ K2 W; O$ l) y- O, {
newDirection(@);
$ u" k. r( a; Q4 G5 I if @.Destination /= void then
3 A" ]7 j* f( o( w @.Destination.NumReservation :=
" T! e" ^2 X4 M: z @.Destination.NumReservation + 1;
$ Z. H) E- r5 N' E3 g end;( s+ r$ @. U5 t/ D, F2 Q. ^
@.CurrIcon := "drivingHome";, o: c% G C! a+ @) L
@.DrivingHome := true;: |$ d q3 n. k1 n+ Q
end;# o* I' Q; g' p) c! Z+ p! E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" k2 ^% s1 x3 C0 d; e
part := @.transpOrder;
2 C0 ^# r6 m: _( h; h0 \ part.move(@);-- load part0 q# M L. f2 K( @) X) Z8 n/ p
@.CurrIcon := "load";
w* [5 s! ~; \ P; t GlobalDistObj := part.globDestination;
* w2 f* H w0 K d( a assignLObj := rgmanager.rgAssignL;
) {8 C2 X4 H. R8 J row := assignLObj.getRowNo(GlobalDistObj);9 `3 y5 @2 R7 N; O8 g# L
if Row = -1 then -- since 70 A- \- h& ?. I; p, N2 t
if lan=1 then
; V6 o, b) B; ~/ H/ w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 p, u0 C Y& U. N i# x6 V to_str("in der Andockstation: \"",?.~.name,"\""));
' m: Y) f" g' K! @/ L7 V else
f2 J; ?' {: j; i7 U: d9 B+ U5 @9 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ] y4 D$ A+ Q& h8 D* | to_str("in docking station: \"",?.~.name,"\"")); * q; T/ @: q: k
end;4 C- m J: ~) o
else3 R; t4 g2 a8 g# M& a9 ]
@.Destination := assignLObj[1,row];
+ J0 G% x0 @; v# | I9 g end;
8 _$ `* z9 f0 J* Z newDirection(@);+ O. \2 C6 q% O2 z" `6 H1 ]
@.HasOrder := true;5 N L5 x4 G, T: g5 f
end;6 D1 x1 Q3 d+ c$ }% S+ q8 [! K8 f; j
end;9 ^ c- j2 r( t. ~; p
end; -- of the method
- Q. E, ^1 a. V |