/* called by: entrance ctrl of the object 'track'
" Q. A5 C) G7 o6 X# a*/; ^: \( w/ h' z6 L$ U: a+ U/ o4 X5 o
is
! z E$ x8 J1 P$ @( a2 {9 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, k+ J' X; k6 q0 \# Ido
7 _3 g" C! Y# F4 C4 l, } Lan := rootfolder.Internal.Tools.AOLlanguage;
; a; \4 r+ k& O u1 k; H3 Z8 u& q- ~ if current = @.Destination -- else return; k/ Q; V( G5 ]. r1 X: c5 f
then/ t+ ~* U8 F3 L3 F7 U9 i1 G
@.Destination := void;; J* l) n) ], ]+ D
if @.occupied then% P, O- v" \$ [* p0 _2 q$ c
part := @.cont;0 Z4 A+ l; D; J( d
@.transpOrder := void;4 t4 k) L* l) C: N* {1 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 @6 ^% \) Z4 N* `1 w @,root.eventcontroller.simTime);
2 h, d2 E: U" s& ?$ N2 `8 H @.HasOrder := false; g& _) p7 _. |0 _5 S; Q
@.DrivingHome := true;
, s/ m: p1 Q" I, q" F* a( _ rgManager.tryToStartTransOrder;; g: |7 X5 |9 E; E6 z
if @.Destination = void) b) S% R" K5 U& ^
then -- no transport order for vehicle @
Q9 }: u' O3 ? @.Destination :=( @1 [" F3 b- V
rgManager.nearestFreeStation(@,track.~);
7 |, c# G; c( j8 Q9 @ newDirection(@); 2 u' e o+ v2 D3 R3 h5 i
if @.Destination /= void then
7 k4 f& m" R/ o( R1 h9 @3 q2 n+ G9 ?4 s @.Destination.NumReservation :=- A, j0 C& s1 {
@.Destination.NumReservation + 1;% W; z+ \* Q! O( Z( h, S
end;: L( W; }& ?! h3 U0 [6 Z+ z
@.CurrIcon := "drivingHome";7 h; d7 |& q4 T! Y" m6 i
@.DrivingHome := true;
7 n/ }: G% M+ ]: P8 w ` end;
* T( s h7 a" ?6 g+ `% T7 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: L4 _) R% f/ c- \' M part := @.transpOrder;3 B' j0 O% H! u2 O+ u& Y
part.move(@);-- load part
: J# F8 g$ i& [8 z1 B2 O! j' U @.CurrIcon := "load";
R3 \* |% n; s- }* R+ H5 c7 n7 I, ] GlobalDistObj := part.globDestination;, B! Y4 c- h: y+ G8 c* n4 q6 E
assignLObj := rgmanager.rgAssignL;6 s0 q* `* z$ `2 ]
row := assignLObj.getRowNo(GlobalDistObj);
9 ]4 d Z! E7 e( R, E3 j* F& h if Row = -1 then -- since 70
4 Z V. S" }; A$ g if lan=1 then6 `) {+ |8 q& S3 J8 h1 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ g4 ?* f L1 n p! P( y8 ] to_str("in der Andockstation: \"",?.~.name,"\""));/ j: s0 R% `, P. n0 Q6 v
else( M1 }1 w4 I, v9 }0 }: P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 }. v# i8 X. `0 n, h5 I$ L
to_str("in docking station: \"",?.~.name,"\"")); 7 T+ Y" o+ u- v! Y
end;# d% N' `( e1 T' ?" e
else6 C' V, \& Q* x) Y6 P/ V: Q0 f
@.Destination := assignLObj[1,row];' Y6 {- }& l# ?/ ~8 e
end; $ d/ a% K5 Z4 V3 v. a# F
newDirection(@);7 ^1 k3 L- }, @6 W. H
@.HasOrder := true;
2 g' d- g* g1 U9 q* J end;
) S C0 }3 a* a+ F( ^3 t7 m, ? end;
" n6 Y, \; m# |end; -- of the method6 i) _) I( ?, [9 x( J
|