/* called by: entrance ctrl of the object 'track'! I% a' v& _0 ]" @* w1 Q: Q
*/7 D& l4 j9 x+ z# y& I+ v
is
" ~$ U1 o; W; ^5 a( V7 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;* a% |& b+ Z: w9 O f- } L
do
) u" N! q' y) z, O( W Lan := rootfolder.Internal.Tools.AOLlanguage;
% k1 u! @ n, r, E if current = @.Destination -- else return
7 c7 r2 {+ _! j; E" ~! L then
& P& Q& k7 f( W0 |0 O# P5 \: B @.Destination := void;
9 |0 M; e& B' h1 b8 g7 a if @.occupied then* ~# P3 ^' s R
part := @.cont;
. `/ R @$ }/ m0 o @.transpOrder := void;
3 x! k9 o+ p& Q3 n) W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, ^( z; D8 [# T8 S+ G- `' ^2 ]
@,root.eventcontroller.simTime);
9 t3 q! C3 ~- u @.HasOrder := false;
8 ]: `$ T% o" c# b$ Q @.DrivingHome := true;- w, Q8 b& E; o, J
rgManager.tryToStartTransOrder;
: v/ S& h: C/ {6 v9 v0 }8 D if @.Destination = void
) z9 b' f4 s4 u/ a) b then -- no transport order for vehicle @2 N$ h& h$ q6 b9 H+ R/ n& h3 d
@.Destination :=8 e/ K+ j/ B8 i; W* z
rgManager.nearestFreeStation(@,track.~);( j) d2 I1 U2 r. G" F3 l
newDirection(@);
, h% ]8 Y. J( x! n- w if @.Destination /= void then& ~3 X; H0 ~& E" I* R1 a
@.Destination.NumReservation :=
/ _4 D/ `8 \1 }. ^ k2 |5 I @.Destination.NumReservation + 1;4 N2 ]3 J |( b, W8 {4 T8 b
end;
& u2 ]8 d2 e) U7 Z @.CurrIcon := "drivingHome";' N* D! d6 g: e% Q
@.DrivingHome := true;
, c Y. f. W+ Q& u" ?* } end;
$ w" [; g \' }/ L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# R8 l ]. e h. V& p part := @.transpOrder;
5 [8 b% a4 H# F8 l- } part.move(@);-- load part
) X1 i0 q4 H4 [& M. C7 ^& q @.CurrIcon := "load";
/ f; j2 n) ^5 _/ Q- C GlobalDistObj := part.globDestination;
. G1 |" j# g" _% n8 L assignLObj := rgmanager.rgAssignL;
! ^3 N& u' K. x2 T4 x+ g$ \ row := assignLObj.getRowNo(GlobalDistObj);
" ]* X- z. _* c1 ?7 I y if Row = -1 then -- since 70* B) \& s9 u) k F
if lan=1 then
8 J% u2 w0 k) A C" d* R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Z; b; x2 C5 u& S+ m. T- @
to_str("in der Andockstation: \"",?.~.name,"\""));0 x& B* S, l; F/ D
else/ D' n9 m J; `& C7 q. M; i& Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 \& ]0 ~+ {5 P0 z8 A to_str("in docking station: \"",?.~.name,"\"")); : O+ p: b! e" @
end;
/ P, B! O" ]) o5 j" Q h else
5 J( I {) O+ y% o3 K, i) j @.Destination := assignLObj[1,row];5 b/ L/ ~; _' F+ T- n
end;
/ R: O6 h, z; L9 b1 S newDirection(@);
6 {) a! M- z, ?% j. w: L @.HasOrder := true;: F) C4 I; m8 y/ R% Y( [* h: j
end;4 U7 k* Z% @! E( V9 B( F: \
end;0 B& e: J& I4 f A% U; b7 K' I
end; -- of the method
- T: y$ c) U1 A( J" B8 h |