/* called by: entrance ctrl of the object 'track') y3 b3 _0 T9 |% w: v( A+ [
*/) S' c3 J( y3 @# o5 M/ C
is
! R# L- P( t* A6 m9 ^) U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- q; `* B! C. D: M) S+ xdo
" G, u- e/ V. j+ H) O Lan := rootfolder.Internal.Tools.AOLlanguage;
- ~7 z( e& X m" V if current = @.Destination -- else return+ N; q# l- ~0 j
then/ j0 S, t5 Q3 m- ^$ _% n- X
@.Destination := void;
6 k$ L' d4 r% }2 G) r+ w" g) z if @.occupied then
) t% p- |3 c% a, ?1 z E part := @.cont;& o4 J9 M3 R, I* j; p% q
@.transpOrder := void;: {+ D$ v. h ^4 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ t8 E1 Q+ s; \9 H8 o+ P
@,root.eventcontroller.simTime);
: T1 A2 R4 @. F @.HasOrder := false;
8 q9 R/ q2 v1 ` @.DrivingHome := true;- e# ]& _7 m5 x! ]# v: j w
rgManager.tryToStartTransOrder;' B9 A* E; u6 \4 B- J# U/ x
if @.Destination = void
* P2 F @( a2 o# S5 W D8 R% `3 e then -- no transport order for vehicle @: n" {; _$ g G1 b8 w# b$ i
@.Destination :=
4 _5 W' h. T0 Q/ z rgManager.nearestFreeStation(@,track.~);
4 `4 M; W. l! S0 a' p6 E newDirection(@); , h1 e$ ]) o9 }
if @.Destination /= void then
2 ]' N1 y% Y" q9 |) J1 J @.Destination.NumReservation :=
# W3 h+ V2 x, r7 g/ B8 W- P% b @.Destination.NumReservation + 1;
3 q% K& C; _1 E( S4 R end;0 c Y& ?4 t2 f4 p4 _
@.CurrIcon := "drivingHome";( s# F1 l4 |6 t* R0 [* `: @0 w9 s
@.DrivingHome := true;
' ]; _+ S7 L1 y! h% u( _) S: G- ? end;; G! T3 N" b# w; T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; f+ B# \; \; L) c+ @; X! m/ e
part := @.transpOrder;7 p, b7 j7 P K
part.move(@);-- load part
$ C. K d( j/ U: O6 ^3 ?2 ]4 c @.CurrIcon := "load";; }" J4 t5 z" v) `0 m4 r% p! B
GlobalDistObj := part.globDestination;
2 A' X8 S! G. w3 M5 X% N assignLObj := rgmanager.rgAssignL;8 C, A4 g5 w! X( i4 y) g. x. w# j; Q
row := assignLObj.getRowNo(GlobalDistObj);
+ x w) |4 D- v) X* D6 w8 N0 k if Row = -1 then -- since 70
: [3 s3 u; @9 [ if lan=1 then
2 J7 S% F5 l% Q# U( A& a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 j( R2 I# e0 d% O& S to_str("in der Andockstation: \"",?.~.name,"\""));% S: [$ q6 P6 Y. E* l+ i* I
else! w% n3 h3 I% w" K" a1 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 c! I. F0 R# ]( [8 e
to_str("in docking station: \"",?.~.name,"\""));
! O$ I l+ t9 S1 y# s/ R end;
; m8 K) K2 c* p- ]- Z else
& u' P/ }8 M* a; R6 g8 e$ g/ E @.Destination := assignLObj[1,row];
+ E% i" |0 r; i, k' Q end;
5 ~* n7 V6 f0 {5 a( Y newDirection(@);
5 R3 d0 H, c; I+ H* q @.HasOrder := true;
' p1 `6 v6 G4 k" L' x# Q end;
5 u. m( w0 ]2 D1 v" ^ end;
+ Z! G# v- U0 n, G0 \2 Zend; -- of the method3 ?7 \4 ~4 B2 P3 L# r4 Y( i2 C3 I
|