/* called by: entrance ctrl of the object 'track', n% o- z' n! K& d3 h
*/' G; O3 L( L' C- n S
is
x7 H+ Q! n& j& r& z, k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ {! n5 q0 N# {! pdo
. g: o5 N# x: u2 T+ }5 P Lan := rootfolder.Internal.Tools.AOLlanguage;9 y2 u0 c+ H+ V; T/ b5 v" f
if current = @.Destination -- else return
% J/ p& H, X% M8 U then. t: u+ |! D5 A: j; P
@.Destination := void;
) R% _$ ~" q& b' z" I if @.occupied then5 |, n2 l) M6 x5 c6 I
part := @.cont;
5 W8 T& K7 d! I4 C @.transpOrder := void;$ O' B) m. s) Y0 s5 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 h0 L E2 f8 f9 e @2 r! j @,root.eventcontroller.simTime);
: |6 U# `& g6 X. s' G7 K4 T @.HasOrder := false;" J# s2 j! l5 o7 a6 v6 _
@.DrivingHome := true;* e) v. q) P% G9 O: G
rgManager.tryToStartTransOrder;, ]6 V8 n4 {8 N
if @.Destination = void7 i0 h4 C9 A- Y
then -- no transport order for vehicle @) C6 h5 Z( d6 y0 A
@.Destination :=9 o Q7 S5 Y' _: \8 h$ v, f
rgManager.nearestFreeStation(@,track.~);
' W$ R q* I3 i, E newDirection(@); 2 T5 h# n; o/ p9 {$ o( w. p z
if @.Destination /= void then6 h6 I6 J) }9 n
@.Destination.NumReservation :=
1 M/ n) F4 ~' [" D5 B8 i. c @.Destination.NumReservation + 1;) c% w% `& r! e0 k9 \* l7 R. x* c. f
end;' ~ h, S( ]3 K9 K; C
@.CurrIcon := "drivingHome";, G m& b" a$ d0 |: S
@.DrivingHome := true;0 f+ E1 R; G9 ]/ t. i0 S) W
end;+ `$ D7 y9 W+ M, K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! E+ Z6 B( B8 }& f part := @.transpOrder;
8 z" N1 b) C1 n$ `1 z part.move(@);-- load part
1 N- t/ c3 N- m, F: } @.CurrIcon := "load";
/ m$ z4 j0 O8 |1 e: M# Y7 x6 P GlobalDistObj := part.globDestination;
* J9 O, v! C5 N$ Q. e2 p5 | assignLObj := rgmanager.rgAssignL;% a% O5 V9 o' [# h( p
row := assignLObj.getRowNo(GlobalDistObj);
5 O* \' F3 [; i ], m/ T if Row = -1 then -- since 70. z$ l- v" ~6 b" w" v9 N
if lan=1 then
( _0 ?5 E" o% ]# {, t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ?# F3 S/ ~$ ~! a; f+ V
to_str("in der Andockstation: \"",?.~.name,"\""));
6 L: q! u6 Y; ?& M0 q" Q! v else
, d, G) G+ i7 K; V, b0 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# o( D3 H! H. K$ Z6 n
to_str("in docking station: \"",?.~.name,"\""));
6 e( \) S* d* k( F8 ?. a1 Z end;! ^% N* W+ o% T1 J
else; `, O7 [: w( n1 r6 n, V( {
@.Destination := assignLObj[1,row];
- _; ~; u- C, h! j+ `% T! Q end; & |$ n8 b9 Z4 ^0 V5 j% @
newDirection(@);
. I0 D9 q0 s& L# I. B @.HasOrder := true;& h8 B' |! ] a
end;
) A R! v" Y$ W5 _8 Z end;
1 M* L7 f5 ]2 l& C2 e8 s# R. \* Zend; -- of the method, C! N) R" i3 L: X- u& i
|