/* called by: entrance ctrl of the object 'track'
$ M q9 `# W9 X5 m: P6 }*/
( _6 T @: I. y& Q9 u+ O1 r/ Ris/ d k/ N2 z* c f k7 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 s, k& }% x0 ?/ o7 Y$ rdo* L/ l& S0 i7 H- ]# O6 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ @! k1 @- O& ]2 A; u if current = @.Destination -- else return
/ W P7 d( a$ O9 ?6 L3 A then1 q; G2 N# A0 m0 ~/ R
@.Destination := void;! f/ O, `1 C$ f
if @.occupied then
* P( L J; \0 J; N1 m0 C7 [ part := @.cont;
3 t* p; X0 f- h$ {8 o6 B/ Y* g @.transpOrder := void;4 ]; @+ i( _; a3 [ h+ I7 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: h8 P6 ]9 i9 ?5 ^4 r! h K @,root.eventcontroller.simTime);
5 g; U. [6 H. v! `5 { @.HasOrder := false;
7 |; J2 g) o3 x( j @.DrivingHome := true;& f: i/ i7 q, ]* C) E* j
rgManager.tryToStartTransOrder;
5 k: I0 }3 H8 K* E& { if @.Destination = void
) G% U. J2 \: N; @8 m- t% } then -- no transport order for vehicle @
& ~0 |/ w. I2 ^: |8 I. I: q8 M) r @.Destination :=
. z/ C& w( @ M; ]' I* V0 b rgManager.nearestFreeStation(@,track.~);
- z7 a+ a: l1 k* O. p4 @/ Z newDirection(@); ; G6 X/ J$ [1 f1 s4 v6 ~" V
if @.Destination /= void then2 S5 ]' u, Z3 F8 u" P3 o6 p }! z1 _
@.Destination.NumReservation :=
; h/ e5 O5 v+ J$ u5 t @.Destination.NumReservation + 1;+ l& \" v1 |: ]: h/ O2 C1 Y. d
end;) [+ @# L% V% }9 H
@.CurrIcon := "drivingHome";5 a: C$ y$ \) o8 z( d
@.DrivingHome := true;$ }* z# a8 g; S3 X/ P
end;
( y+ o. v- C8 E; | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; M$ a& e5 T4 ~; r3 X X part := @.transpOrder;
/ B) e% H6 D+ E/ g" J* x, o part.move(@);-- load part
4 |" M" u* R5 @/ L @.CurrIcon := "load";" f# e/ }, [; F, |: I: T
GlobalDistObj := part.globDestination;
( O! Z r z: E+ {# M1 O assignLObj := rgmanager.rgAssignL;
0 {* n) S6 \7 h% i row := assignLObj.getRowNo(GlobalDistObj);- \8 c; v0 M: H7 d. \7 V
if Row = -1 then -- since 70
% | q4 w! a h7 |2 O if lan=1 then- T- v2 w1 c" A0 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: O2 c, l8 ` j; e$ B to_str("in der Andockstation: \"",?.~.name,"\""));
) c: o J" y9 Z: k9 j& i3 U else/ Y/ v9 s. m" p Q6 Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
v( p* E: S% [2 o3 h0 N to_str("in docking station: \"",?.~.name,"\""));
; o' K+ P8 y2 [) N+ v. h5 T end;5 o; V6 [$ @: k0 i$ j) l9 I
else
! h9 W0 l) x$ [' j6 Q, u5 k! L @.Destination := assignLObj[1,row];
# u: s# ?& o, a* i# d3 r! A. A# V) l4 W6 T end; 8 C4 L6 ^- M& q: E3 e x
newDirection(@);
+ G" M- @5 b- Z* k5 ^ @.HasOrder := true;
! G5 B( ~2 G& o0 t. U4 }/ e$ o0 k end;
' ]5 z& F g0 N end;
& X& d! [% C! L) ]) _- Q: |7 b/ kend; -- of the method% r; n, ? [/ ~- |5 S& Z$ d
|