/* called by: entrance ctrl of the object 'track'
2 v G/ v- a+ n7 s% I*/
: [# @- h% {) t" u w! w# }8 Gis* I2 e# b; ?/ F2 X! b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. e" P3 o( s2 l4 I' wdo
% K; }7 ]9 v8 g/ G+ n! v9 g Lan := rootfolder.Internal.Tools.AOLlanguage;" z; ]: ^: W7 K
if current = @.Destination -- else return
& C5 J2 ~* w9 U3 p3 Y then4 b4 f e1 u2 S- h0 O) E4 u
@.Destination := void;4 S1 e" n. {3 u' w! x5 T
if @.occupied then% m; E5 }9 ]2 O" I
part := @.cont;
w% K& l3 d1 h# H @.transpOrder := void;" M/ w; b' [5 d, G$ P& \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 e6 @* _" q4 `2 D2 D; {' V' g
@,root.eventcontroller.simTime);- y: X" b9 V. ?$ e- F
@.HasOrder := false;% j7 H6 i! p( o8 i5 g* y+ w% [
@.DrivingHome := true;) j: R. p6 D, K# g* R& U( f' L
rgManager.tryToStartTransOrder;
2 S; H8 M9 t. _8 v, s9 I if @.Destination = void
& H, O# o* w5 k then -- no transport order for vehicle @) s# W0 @- `6 q1 ]
@.Destination :=; Z, \0 e! J3 Z* N/ s7 k
rgManager.nearestFreeStation(@,track.~);
9 u- \) d, L( I# y: _7 S3 S& n7 W newDirection(@);
8 j% k" y# @% a9 A, W3 a/ {% G if @.Destination /= void then
8 X/ d, d1 s! h @.Destination.NumReservation :=) \& s- z' |9 p& A) c6 B8 C
@.Destination.NumReservation + 1;7 p' W" N# E: [' F4 ]( y
end;
( O2 b/ M& R- V1 O5 S- Q# H @.CurrIcon := "drivingHome";* O, Q4 f# F3 {1 H. C1 _
@.DrivingHome := true;- ]9 L+ S% ^% Q5 u; T
end;& N$ t- X1 y* Q' G, T$ T1 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ N) W q' X% f% Y& w& y
part := @.transpOrder;
8 o' ]0 }9 D* \. a( b( l1 O/ O part.move(@);-- load part
' g8 c) ]' H2 G* K% i1 f# ]8 h) b @.CurrIcon := "load";1 p. F4 O* i2 a. h* a; r
GlobalDistObj := part.globDestination;
9 c' d+ i% [ D9 f4 t assignLObj := rgmanager.rgAssignL;9 r% k$ E1 y! v! s
row := assignLObj.getRowNo(GlobalDistObj);2 Q: v& G3 Y4 n9 o* [4 h8 U
if Row = -1 then -- since 70
2 J7 h1 O* Y; x8 t. U# i/ N if lan=1 then
% _- r8 ^* j8 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 o5 v( Q) D/ t$ R to_str("in der Andockstation: \"",?.~.name,"\""));# G' V( h/ s4 N, g3 ~0 ~! F. P6 Q
else
3 J7 L( p" G5 [& U6 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* r* X3 o* c7 U, M
to_str("in docking station: \"",?.~.name,"\"")); ; w- |! j1 Y* D! P* T/ ]( Y. ]
end;
! x; H+ d4 e2 |$ e% r. F! y2 l else
# w8 a3 B% C" l6 g6 d @.Destination := assignLObj[1,row];( f: o& S- T/ X# F) | a- W
end;
3 L6 y9 S9 f. `) H4 H4 ~ newDirection(@);3 X% U! |; j4 w* w& J* \7 ]0 N
@.HasOrder := true;
, T% T: E, b( A: f+ p9 P8 @' r* Q end;
0 Z0 {) J2 L6 H$ G: z+ J+ T$ M end;
1 z: T0 P& p: _) }8 Bend; -- of the method
+ v9 ]) w4 [: E) d1 A6 P+ p: @) { f |