/* called by: entrance ctrl of the object 'track'
% f2 i6 c( j7 s*/5 ` h" u+ E" j7 e9 b) k% k
is
' a# B1 x, h9 R1 I; ]; R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% k/ ?; e1 n# ^- e7 b cdo7 K6 h5 `6 r5 l' u# y1 U( K
Lan := rootfolder.Internal.Tools.AOLlanguage;3 Z# P2 `) r# i& f* F( D% e4 o
if current = @.Destination -- else return
, ], F `) Z" o* n- r then
* ~- a* T9 X: d& o! w4 e& T9 b% _2 ] @.Destination := void;3 w( {/ Y! [, u- f# e6 q
if @.occupied then
$ V( U' [3 o; y, q0 V part := @.cont;/ j& E7 y) E! D% X2 s) w: l
@.transpOrder := void;
8 u7 a- E" x9 S, c( X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 w% j4 T* e9 A# ^
@,root.eventcontroller.simTime);
) `/ L% V0 _+ m( C. B3 B @.HasOrder := false;( r7 ~& S- c! Y+ O! V
@.DrivingHome := true;
4 \0 G% |. ?. W4 m" U rgManager.tryToStartTransOrder;$ W. ]( {1 S* ^# r
if @.Destination = void
+ Y2 a4 {$ m. E5 A8 w' d then -- no transport order for vehicle @
4 V$ ?1 ]! @( r2 B @.Destination :=7 U3 \! @" o+ o# A5 K" v( v
rgManager.nearestFreeStation(@,track.~);4 c$ D9 {+ B/ o+ Y6 i6 C
newDirection(@); : u6 V2 \/ q4 U, y3 j( F
if @.Destination /= void then
$ o G7 _$ v$ Q4 L @.Destination.NumReservation :=
+ x4 w' r( g& @5 B& y' T ~& M6 F @.Destination.NumReservation + 1;" T) P8 b% l3 k# K' v, x
end;
! k8 L# L$ c! s' v5 n6 {9 G. a @.CurrIcon := "drivingHome";, U4 {( [6 H# k* l0 [% b8 d. N- X
@.DrivingHome := true;
& Y/ ]) e8 O% q9 V! V end;( S5 [+ f0 M8 ]9 T2 F/ W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* ]$ S9 ^/ m! ^ Z/ \. G. m: Z8 \! O
part := @.transpOrder;
6 y% p7 `. F( f2 k" W part.move(@);-- load part
) e9 U2 U9 T! U& N4 B3 e @.CurrIcon := "load";. c8 y& V: a$ P
GlobalDistObj := part.globDestination;2 Q2 M( R5 J U, R0 @" y' ?
assignLObj := rgmanager.rgAssignL;
4 ^% k2 `0 h7 a' ]+ P7 J row := assignLObj.getRowNo(GlobalDistObj);# ^- E+ g' ^6 u8 X# V" m
if Row = -1 then -- since 70
q O$ D' M5 J6 r$ F; [& w if lan=1 then
5 V3 m T B4 a3 A; E' W5 p; t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), ]% p3 D$ a. h& x
to_str("in der Andockstation: \"",?.~.name,"\""));5 s) ]3 S5 Z1 r+ x
else* W3 U- S( f& i" J g3 E1 m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 ]! |+ H) D/ J5 `8 r; ? to_str("in docking station: \"",?.~.name,"\"")); 0 E/ l& p2 f/ v Q# S9 e1 x( d
end;; e. u( B% Q" g' O# c( x
else
! i1 M6 q% S$ C2 m9 ? @.Destination := assignLObj[1,row];
9 {" g! A; M# e( K6 ~4 e end; , g+ {1 w: }) C9 J& q8 j8 O) J
newDirection(@);8 c9 Q [$ A& v P. q0 }& T. X
@.HasOrder := true;
0 Z- N% \# b3 H0 w6 S: d1 o end;
1 A' D. r9 w7 E b( ? Y end;
, e+ @9 w8 |' iend; -- of the method$ s# }0 W! q# l% t8 u% Y
|