/* called by: entrance ctrl of the object 'track'
, ]% H! ^$ e& h# l% M& s: a& j*/
0 z( @" m/ Q& k% }9 |' cis
" N& o( @2 s- E2 R8 [2 y% ]2 {7 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;. s* H6 u7 i4 O6 ]! T0 W( a/ s
do
5 h6 i" [" x4 ]' i8 b Lan := rootfolder.Internal.Tools.AOLlanguage;( j9 g, j" z `
if current = @.Destination -- else return- t" |& l R$ H2 p
then" F. r" a% _, _5 Z
@.Destination := void;6 M$ n4 `% }( s. e
if @.occupied then
" k6 s) W. U. | part := @.cont;, v' E4 q* t m! N) c9 f0 s
@.transpOrder := void;
r+ J# b* [- ]" z0 a8 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, f5 f- n- ~! W4 H: L1 X# s( V
@,root.eventcontroller.simTime);( [3 x) l/ Z6 s+ p- J7 a- i6 t
@.HasOrder := false;- P! i) q$ {3 Q/ J n
@.DrivingHome := true;7 R4 |9 t6 K! A5 `; |% e
rgManager.tryToStartTransOrder;
& R# E+ M2 p! G3 R( R if @.Destination = void( ~8 {( u! q3 D. s
then -- no transport order for vehicle @" U5 `5 H1 C! B
@.Destination :=
+ ~# H1 r P5 |, r7 W6 R. h& G rgManager.nearestFreeStation(@,track.~);
7 e+ H. i* J5 Q X. p% E% B/ M newDirection(@);
' G8 z! |) x, M3 t if @.Destination /= void then0 X/ K: B! S' b. x$ |( A/ i
@.Destination.NumReservation :=
! T' H' i' \8 S* z9 g; v* c5 X @.Destination.NumReservation + 1;
( H k! F) S" p% _. e2 Y end;7 i0 n8 T4 X) p- d& I- A) G q, u3 [
@.CurrIcon := "drivingHome";( T; j- @5 d8 q( p* |* T: |. ~
@.DrivingHome := true;" S( b% \1 Y) m8 B0 _2 K4 ]
end;9 z# ]; G& ?9 \" a! v7 s6 i3 l; g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 X6 T5 H1 N* v3 m' ] part := @.transpOrder;5 \$ g% }9 q! y$ O3 f& f
part.move(@);-- load part
3 K! F4 M! G) j E# |' I @.CurrIcon := "load";! N K; F! T9 Q) x% k7 }
GlobalDistObj := part.globDestination;
& |$ b6 G3 [' v! f% `' c9 H assignLObj := rgmanager.rgAssignL; a4 m. _$ `2 L% d( \
row := assignLObj.getRowNo(GlobalDistObj);
8 F6 } }/ ]& H& [$ o3 }' [" y6 b if Row = -1 then -- since 70
' \9 ^1 G$ s* w3 \; Z) [ if lan=1 then* A9 I# g7 Z8 X: I- _7 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," E7 f4 p8 Q* o ]
to_str("in der Andockstation: \"",?.~.name,"\""));) J8 x2 \/ w R! j# o
else
8 B- p7 k6 n4 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* I9 c+ g# M0 s6 N- k% x2 L/ g
to_str("in docking station: \"",?.~.name,"\"")); $ e* @) m2 Y: f) h. N! @! x c
end;
" J* ~' N5 D6 F4 n+ t3 y' o6 X else
9 u8 U2 m; S/ L+ M% m6 ^ @.Destination := assignLObj[1,row];/ z) F8 b- c8 I. |6 @) n
end;
* B! c1 @5 y' C# y5 N4 V newDirection(@);. i# e4 q# c1 R* C/ y5 j4 r
@.HasOrder := true;! ~3 }: C/ z- ?4 O% @3 d
end;
1 ~' J" V& D3 T end;
# p8 s& x5 ]0 ~end; -- of the method4 n) f: C7 U* B/ c' Q( C+ q2 W
|