/* called by: entrance ctrl of the object 'track'
) W. M V; H9 ?3 S U*/, U# `' z P7 G- r
is
5 _& ^$ S6 r. [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 ]9 h7 U: d9 A! P
do# y: J4 D+ W$ p9 u0 D; a! e
Lan := rootfolder.Internal.Tools.AOLlanguage;! H2 N. {. A& r5 @5 I* s
if current = @.Destination -- else return
# u6 M1 h: [, S% V6 p1 U then+ \: }9 n; ?: K
@.Destination := void;0 A r6 s4 t9 h6 \1 ]
if @.occupied then0 ~+ m. d. s W" D" c
part := @.cont;
% a" l I1 O* I @.transpOrder := void;9 r" I7 K2 Z. d* _. t+ ]5 h2 C% X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" J% P* ~% z7 s% o9 p& }8 V @,root.eventcontroller.simTime);( H j% u' Y' T- T& s P3 k# t, C
@.HasOrder := false;/ I4 R; o4 D$ }! w! D; i
@.DrivingHome := true;7 H/ U' W) {$ K7 E& g
rgManager.tryToStartTransOrder;
5 r( ]# T j2 K3 x. N if @.Destination = void8 F$ u0 k8 x' a
then -- no transport order for vehicle @7 O0 a% j1 M/ h4 ^- e7 i
@.Destination :=6 P6 b, V: b0 j3 `& X/ S
rgManager.nearestFreeStation(@,track.~);/ s" d8 \- b, `! V, W
newDirection(@); 9 t& S3 i8 z* i
if @.Destination /= void then& r- K. T6 t* X* v
@.Destination.NumReservation :=" ]& P: ?4 R; |7 x: X1 H3 {
@.Destination.NumReservation + 1;
" F I' S) C/ H3 Z, a end;
( e! F. C1 f% `/ {% v+ e0 U' m. \ @.CurrIcon := "drivingHome";
* x+ x8 E) k3 H4 U, ^! f+ U- v3 _ @.DrivingHome := true;
) o8 |- x$ e/ r" x% a end;
7 I' g+ K1 V3 e4 B2 f, ]) n* G3 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station. M- _" V! P3 r/ g2 z" g3 x
part := @.transpOrder;
6 [* j9 S3 \3 i* { part.move(@);-- load part
5 Y2 v1 c0 o& [7 T3 S/ B1 O2 e: h @.CurrIcon := "load";
" m V5 _0 Y& D- j5 D GlobalDistObj := part.globDestination;
+ E4 t" e$ o. L5 @# z3 |9 S assignLObj := rgmanager.rgAssignL;
! Z( s) E1 o4 ~2 Y% k6 X( m row := assignLObj.getRowNo(GlobalDistObj);
1 L# B# ~4 q4 ? D& N/ p, ^ if Row = -1 then -- since 70" e T* B3 y3 R& c' q- t
if lan=1 then
% i' r1 [/ L4 f* C/ ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," A3 [3 z% u! }$ n$ f* j
to_str("in der Andockstation: \"",?.~.name,"\""));
: L" y& T' V; u/ m" p else8 b! U7 {) d6 \7 a$ W: m4 i2 o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% r1 W- ^: |7 Z* k
to_str("in docking station: \"",?.~.name,"\""));
9 ^" R" u: n+ C; o' E" L- H2 p end;
) v, V: O2 q/ w* j% O0 [3 o else
) E D) m0 G, z W @.Destination := assignLObj[1,row];
; _$ E' G1 e1 B6 k end; 2 o. ]- f- P, {! B4 j; b
newDirection(@);
& A9 n t* X/ o+ I$ ^- A- Q$ k @.HasOrder := true;: b, q8 {9 ?- [, ^" u
end;
! p* M. O6 N9 h( Q! G* s5 c% Z end;
. ^ l8 X# F8 Q5 Q, x* Kend; -- of the method- T7 X0 c+ U, @3 v; ]$ n
|