/* called by: entrance ctrl of the object 'track'
6 `0 A9 P4 }- E% b- C' u*/
# S! { o+ Y/ N% ^ Y* c: Cis
, U/ `1 q0 r6 i! B5 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;. C# R3 J+ k6 Y
do2 v& |0 i% |& N9 b. p
Lan := rootfolder.Internal.Tools.AOLlanguage;
* L- ?& C# T. z b; r, v if current = @.Destination -- else return. V$ r, r e- R: Y' \" y5 \# @( a
then
" `5 k( @9 ^. D0 y5 E! J& ~# t @.Destination := void;. ~9 b( |$ N4 M/ H% e& d' d
if @.occupied then! d- u4 o7 m, }+ b' w& g& h/ K
part := @.cont;
7 `9 B* {; B, k0 \' L @.transpOrder := void;* Y4 \8 [& j) [5 T: c, I4 O% i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) j9 K1 I# y @' O% i @,root.eventcontroller.simTime);
4 h4 S V( ?: W: m/ [. p @.HasOrder := false;
; X1 A# \6 Q0 w/ X5 D @.DrivingHome := true;3 M' h3 O, C. \' E6 b. k: e# G
rgManager.tryToStartTransOrder;, E/ e8 Q) y/ ]7 q8 S2 f$ f) [/ n# D& O
if @.Destination = void K( R+ Y0 m' A, s8 b! R8 i
then -- no transport order for vehicle @0 x( ]; Z1 c- R- B0 I: e* h* ]
@.Destination :=
o, R8 d4 z( x" H( t, P6 }' a rgManager.nearestFreeStation(@,track.~);: c( W" N) C' W0 U' c
newDirection(@); # T0 W; q0 [5 l
if @.Destination /= void then* T# F! X2 \5 _
@.Destination.NumReservation :=
. c& A, ~+ l8 f( a2 v1 u @.Destination.NumReservation + 1;5 r( D( M6 Z# r8 B
end;6 w3 i r9 D0 q9 S
@.CurrIcon := "drivingHome";
1 F# L+ A0 g5 B$ q, n# A# W; R @.DrivingHome := true; G! F$ X* M4 j) w" ?: v# _* D) D. Y9 _0 ~
end;$ O1 t; _0 ?- Q4 _7 g! I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
a# R) G$ H- [9 k3 c ?( ?+ u3 A part := @.transpOrder;
" o4 o& O: b0 a# d$ x r part.move(@);-- load part
. T# f1 j/ e: F @.CurrIcon := "load";8 Q$ [, r2 J5 ], U: m' v4 n
GlobalDistObj := part.globDestination;; H+ s3 ~, l/ A
assignLObj := rgmanager.rgAssignL;
4 L9 Y+ _7 ]& ?. {6 p* n row := assignLObj.getRowNo(GlobalDistObj);
1 V |0 l! [" `- A0 }; j7 Y5 T" N if Row = -1 then -- since 70
* [( e6 g& v& ]3 Y% r3 [ if lan=1 then- Q& D; J2 e0 X# s. D7 }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. O; A- ^1 U# a( ~+ g to_str("in der Andockstation: \"",?.~.name,"\""));1 |( o0 b8 c! a( ?" G) f
else
/ @! j) O* t- V. T4 ~: u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Y+ u; l7 }- U; O( F to_str("in docking station: \"",?.~.name,"\""));
. j( L* h& V, v' G+ }5 o0 ~ end;# @- q' n- r6 T
else, `) g7 `( u$ a: L4 x
@.Destination := assignLObj[1,row];
( G! U0 E' L" G* G end;
: u3 W6 Y$ K+ j. P newDirection(@);
P8 ~8 W* I, E7 T7 @# q) R @.HasOrder := true;
9 ^: P; f6 @* u9 j2 { end;
H3 \2 Q5 I: D% U end;
/ U1 c, f6 M0 Bend; -- of the method9 Y$ i9 }' h$ G. A8 d+ l; `
|