/* called by: entrance ctrl of the object 'track'( R. N8 t) s% T/ A' ~; h* g
*/
" U% G0 J# K9 M+ _% W& Pis) T, D, x, s( D2 m0 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, e6 H: J1 S; L1 T8 v) ]
do
0 j' j0 {" y1 |$ k9 \ Lan := rootfolder.Internal.Tools.AOLlanguage;4 H* E# N1 D7 F8 I: v- }
if current = @.Destination -- else return4 X U8 ?) Y( o$ r, ~4 h
then
. W1 J' \# V. N. c, w8 i% s2 I @.Destination := void;; `' g" J' Q1 o- \2 N- R) N
if @.occupied then
* w1 U5 c5 P3 F/ o0 J part := @.cont;; q# R& Q0 t/ V) G2 z; z9 c3 I
@.transpOrder := void;
! l) |6 \$ T3 D# I, a& C/ Q2 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# }, u% J4 }7 v% a+ m @,root.eventcontroller.simTime);- F+ u: ], k5 U4 q ~9 e7 ^
@.HasOrder := false;( {3 @$ ^9 `8 {' T) g
@.DrivingHome := true;7 O5 c& t+ ]' `
rgManager.tryToStartTransOrder;
+ J3 {* i: p/ `5 [1 m% b if @.Destination = void
# V, Q4 S: a8 t6 e' y' N then -- no transport order for vehicle @
1 c `; e, ]$ }4 @$ ] @.Destination :=
* _- c: s+ @& }: A) _5 M2 b rgManager.nearestFreeStation(@,track.~);
. A6 E' |& H* K& k, ~7 t newDirection(@);
$ W# |( e0 T# O$ \ if @.Destination /= void then
" q3 w/ Y8 \" \% V# e, G5 o @.Destination.NumReservation :=
) r7 T6 ~7 c9 d( x8 A; T1 b' v @.Destination.NumReservation + 1;
0 C- F1 g; l4 n end;& Q9 o$ W4 ~9 I/ i, L6 U0 u
@.CurrIcon := "drivingHome";( ^# b! Y/ M( K1 y7 \! T9 U& ~
@.DrivingHome := true;! ^+ i2 O' @5 K! X( X9 F! T
end;
3 X; y9 ^3 d n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; S7 Q% j# v6 U- e5 V4 [+ A7 [ part := @.transpOrder;
, q8 d0 k+ u9 g' d" q" T. a/ h' r part.move(@);-- load part' H6 [3 c2 w+ g6 T. f" Q
@.CurrIcon := "load";" k9 O3 h& m' F: v. f x
GlobalDistObj := part.globDestination;0 c, k/ a+ R! I4 W. k
assignLObj := rgmanager.rgAssignL;
* B i3 \. y! n; [9 ? row := assignLObj.getRowNo(GlobalDistObj);! p* ^" Z h- r" Y' X! ~6 k6 F
if Row = -1 then -- since 70
6 e2 i& |" a3 o/ q if lan=1 then
$ h; n) o6 v, |$ V0 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 F8 ^; E4 v" d9 w V
to_str("in der Andockstation: \"",?.~.name,"\""));/ A8 f' V: n4 | m) X* i3 Z
else# A1 o5 X% }. B8 I- W2 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% }* S1 W t; t3 |" l
to_str("in docking station: \"",?.~.name,"\"")); 6 \1 {6 i: z" V; j
end;& v0 f# e% ~7 }
else. j( J7 A5 a! l' o I3 L
@.Destination := assignLObj[1,row];
6 o5 @& T) ]; Z& ^0 E end;
7 ?. A7 W7 M/ K newDirection(@);' C$ M$ E2 Z ~5 n9 o5 |
@.HasOrder := true;7 V+ C! v( G0 P6 i4 f' E
end; @ q. \& o$ D0 b7 t
end;' p, U% V2 r/ g9 m& i7 ^
end; -- of the method
: x7 |2 @1 h( d+ X' X$ E |