/* called by: entrance ctrl of the object 'track'# g9 h" k( y) k' T
*/0 W0 d& ~& A. x- b
is0 k$ {+ b: m ]7 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" S0 o" @, A8 D
do
: Q. X: X5 z( f5 N9 I+ i3 F e8 C( ? Lan := rootfolder.Internal.Tools.AOLlanguage;+ F) j3 G1 }5 Y/ S8 A
if current = @.Destination -- else return, X: A! h0 E3 @. {
then( b# g2 F& Z5 W! s! D! `5 f7 k
@.Destination := void;: S. E, X% X) p4 S( F0 M
if @.occupied then
: G4 {5 `) f+ s part := @.cont;
J& J) W U+ e& L" D @.transpOrder := void;
5 K6 Q0 q& [/ |# x* B( N1 M$ B* s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 W1 D3 N5 ]0 B @,root.eventcontroller.simTime);
) _6 a, [* w5 m- j) }- j @.HasOrder := false;
. e% l3 H, y8 q4 D2 l [ @.DrivingHome := true;4 l: M. F# f& _% L7 ^5 N. I
rgManager.tryToStartTransOrder;
+ m9 u X* ~2 @1 K( d if @.Destination = void; Y4 j; y1 |( t- E" D- @
then -- no transport order for vehicle @
* _* Y. }& D9 @ @.Destination :=
6 `3 [1 G/ x4 z. j4 q& P8 |0 e4 U rgManager.nearestFreeStation(@,track.~);% G. `+ c. s3 z4 P1 O2 l* Y
newDirection(@);
! i) p: W E0 w2 ]* |' L6 c if @.Destination /= void then! W) g' } y7 y
@.Destination.NumReservation :=
. B9 A( D8 |3 U7 O+ E5 U/ Q @.Destination.NumReservation + 1;: u1 [" h" I2 }& P+ n
end;
+ o6 G: O* Y0 c- a9 g @.CurrIcon := "drivingHome";
! v: M$ w" D0 c" y4 k @.DrivingHome := true;
# [4 Z1 w9 Q% X" g, e end;
2 u7 c5 n' K- p, V4 A- d. E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 D, S r2 _( }: g7 B5 Q, r part := @.transpOrder;3 N1 [9 V1 r! {: j; y: w J
part.move(@);-- load part
, L: y6 D7 v! a8 S/ [- O @.CurrIcon := "load";* u) H( E+ C, l6 Y" s2 z+ x
GlobalDistObj := part.globDestination;+ }& h5 i+ B' d; ]# x5 h& f
assignLObj := rgmanager.rgAssignL;
6 @: E9 m* Z. {7 q row := assignLObj.getRowNo(GlobalDistObj);
! y1 N2 y6 N( r7 ~ w if Row = -1 then -- since 70
/ y) i% w" I! u9 Q( a. B% J0 | if lan=1 then* _& T0 C) I# H: C# _5 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 [( i4 l% G7 B5 h- `$ B+ W. y- W) x to_str("in der Andockstation: \"",?.~.name,"\""));
) p. u2 i* F, `2 ` else
; w1 f$ Y }( g% r* | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 r V- X8 z8 g( p( H
to_str("in docking station: \"",?.~.name,"\""));
1 n6 g5 y1 a% ~9 U H- \! h end;- Z# `" q4 g1 z% q: J
else
) f+ g( R$ p! `5 B @.Destination := assignLObj[1,row];, S% k) e! D5 I/ G) s4 g
end; 0 o, v( f! M1 `9 M) L6 ]
newDirection(@);+ B4 N9 ]- W4 i0 }' g! g: q( w2 V
@.HasOrder := true;
( ~: T! n& W% A/ A& R3 J+ _ end;
/ O$ N6 r' |, O; | end;
1 t& S- m2 C Z1 n! e. E+ Eend; -- of the method
6 [$ B1 m5 }9 K) V1 A- u; n |