/* called by: entrance ctrl of the object 'track') T; ]! q' U, o7 g9 V4 o0 m0 I
*/5 s* u i0 c8 \
is3 H/ ~+ p2 B9 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 }/ X9 S0 W7 c+ @* J9 b! L4 f" n) Xdo! u( U: h5 ]8 E) g: m3 S1 h
Lan := rootfolder.Internal.Tools.AOLlanguage;1 q: ~, `$ B, p. s1 O7 e
if current = @.Destination -- else return
" l4 Z1 X+ h5 E( H+ b1 d+ @7 G! D K$ @ then2 ?( y8 n4 L. d, w, O) r S
@.Destination := void;
5 V. W& r( a+ C2 S- y* v if @.occupied then, I) f0 Q4 ~2 G9 Q$ `* n7 {
part := @.cont;
2 N' R: G/ f( ] @.transpOrder := void;; B9 h) Z M) C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 W5 L$ k5 t2 i. t' @) W @,root.eventcontroller.simTime);6 F% E! n) v' l+ w" J6 K: H
@.HasOrder := false;
5 K- P9 a. C; J8 [1 ` @.DrivingHome := true;
0 Z7 k( M! D" l* O2 A rgManager.tryToStartTransOrder;
1 c1 R7 _- M n5 T if @.Destination = void
t. S* L& w) [* y% Q5 R0 m then -- no transport order for vehicle @6 O I* ~( @9 M1 |% l
@.Destination :=( K) c: B. L' L/ S2 X
rgManager.nearestFreeStation(@,track.~);6 i" [6 |- c! J: w
newDirection(@); , _( t, f4 k) S
if @.Destination /= void then
* N7 W6 s! }2 k9 B @.Destination.NumReservation :=2 G6 Z+ f, f5 N, d8 n
@.Destination.NumReservation + 1;) O' z; P5 ]4 t* U+ H1 O# Z
end;( \3 M, R6 r% q
@.CurrIcon := "drivingHome";
: r$ N3 T/ d, Y) p @.DrivingHome := true;
( {8 K3 Z! \0 L: G8 h$ z; k& ?5 \ end; f% K! B' n3 ^" }: m8 V. t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 Q& |# r L4 r2 V3 e. t5 v4 H part := @.transpOrder;" R9 Q% |+ W2 G
part.move(@);-- load part
7 M6 T/ E5 a! N8 h V9 s @.CurrIcon := "load";* T: A9 ~ @: x& ]
GlobalDistObj := part.globDestination;8 s3 K( _& Q- R X4 ]2 [
assignLObj := rgmanager.rgAssignL;2 c! l$ X7 u' M3 L
row := assignLObj.getRowNo(GlobalDistObj);
; F* d, b) M g/ t+ }/ @5 c if Row = -1 then -- since 70
: H$ G3 x8 R8 m: V7 W" P7 r* Y6 ^ if lan=1 then
6 w8 D. R7 v: Q5 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) h- R: g! S( y& d! U# _/ o to_str("in der Andockstation: \"",?.~.name,"\""));0 P( l/ L0 g5 [# K; k6 h. I4 h
else/ {- X9 C# u) l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. K% K6 k! N/ T) H+ \ v j9 Z' e A$ d to_str("in docking station: \"",?.~.name,"\"")); 5 H' f% U/ c0 i* p9 ~
end;$ x- i1 B0 n& l9 N. G2 h7 I
else2 I" L' {. q) L0 t. `6 g0 s
@.Destination := assignLObj[1,row];
: \7 u0 D- B8 c3 F3 r5 B v6 m end; : q( s+ }8 m6 q5 f6 b4 ?5 F
newDirection(@);5 y4 H3 u7 ~/ l7 u( x" B O! R3 ]/ \
@.HasOrder := true;( a& P; a/ l1 j9 P; U- l4 j. _
end;& ~$ Q$ Y1 S+ q( ?/ F" m/ |
end;: v1 ]/ s4 Q; P8 r, |
end; -- of the method
- J4 f, z+ J2 n7 h& s+ |! H |