/* called by: entrance ctrl of the object 'track'
3 ]& Z! A4 }+ N* {% G*/
6 H1 J0 Q- O s! vis
0 Q9 m) }7 C' ~- I) s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 ^: G! Z$ T7 K0 E# ddo
5 I" f* }$ a+ H( s0 @( X Lan := rootfolder.Internal.Tools.AOLlanguage;
5 u$ ^) W# R2 }; K' X5 A4 h if current = @.Destination -- else return5 `. G9 {" S5 ~# ?% f' H# S& l$ E
then
' h" B3 q" _5 i5 o1 W7 i @.Destination := void;
* ^8 q1 C" S+ k% n& B5 K4 r+ S o! i if @.occupied then; |8 ~ O7 G; i! Y$ \3 j
part := @.cont;
* ^( r5 B$ T) ^ @.transpOrder := void;% y C/ n, w( E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 \) j7 v' {8 L: R, ^8 c# g @,root.eventcontroller.simTime);3 B" _+ W4 |6 \ J8 y* V) s: D
@.HasOrder := false;
; o( v% n, b( v$ r @.DrivingHome := true;
. @8 Y2 X( B( _7 M. a rgManager.tryToStartTransOrder;
, m& `! b% \( [! ^! v if @.Destination = void
1 s" F3 b% o# D: s% f) k then -- no transport order for vehicle @
" r# H0 X* T$ q& ^( z u @.Destination :=2 I! a6 |" ]$ b
rgManager.nearestFreeStation(@,track.~);1 ]9 o7 ~4 o' B& n6 J- O" \- f# y
newDirection(@); - N5 a5 o8 X/ W6 V) Q" U' A: g$ N1 k
if @.Destination /= void then3 b3 e' r/ N4 g- L" h" N) H _
@.Destination.NumReservation :=
/ Q2 `3 B8 |+ t: i, G @.Destination.NumReservation + 1;
: M; K! J+ c* ~7 c0 c- X1 D- c end;% h: S; U r8 W% K
@.CurrIcon := "drivingHome";" T. {4 t: z% O* _ m5 f- H
@.DrivingHome := true;8 j3 h* ?: O8 ]
end; [4 a6 d" E' u
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
D4 u+ u( F9 r. h4 p$ u! ^ part := @.transpOrder;$ i# r2 W" B, z- d5 K* o
part.move(@);-- load part( `2 R/ X* i* M. }' q' l8 `
@.CurrIcon := "load";
C* o( R3 e, h GlobalDistObj := part.globDestination;. c C8 \1 ~$ O/ U. e# n3 y
assignLObj := rgmanager.rgAssignL;
/ d& E: h# q b5 _4 }+ O% i Y1 V row := assignLObj.getRowNo(GlobalDistObj);
9 ^9 O2 Y" ]5 N0 ]) I: X9 E7 ~ if Row = -1 then -- since 70& m# p2 z0 F8 g& {: Z9 `7 g* i0 P
if lan=1 then" r b& x' m' Y9 x1 c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 w9 F* a2 f& ]: X: e
to_str("in der Andockstation: \"",?.~.name,"\""));, i$ O2 x, q4 g1 C% \& I, i% ]* F
else1 r, B& r( D6 D8 A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- o" Q- q' H; o- ]6 F, B to_str("in docking station: \"",?.~.name,"\""));
, Q* I" p9 u( ^* N0 A) e9 ?# _. H end;, y3 I$ _6 p9 @, o/ w ~+ C% X/ ?
else
' ~; X# s$ m% }: X1 O @.Destination := assignLObj[1,row];
& Q, g# r# r. K* f% m end; . E2 N i4 F* u0 f6 a
newDirection(@); y5 @+ j. [+ _( C# z5 i; \- j7 }
@.HasOrder := true;
; V. } g# b0 n e/ P8 b end;0 \" u! l( M7 p, |( J
end;0 _0 m% K, U6 E B4 H
end; -- of the method2 e8 u% T3 O: }! L9 Z
|