/* called by: entrance ctrl of the object 'track'. \4 w# K% u: b! Q* [
*/3 W2 X8 ]4 \8 |8 }8 ~+ |; `, O3 j
is6 G; C* {8 b" Z" l: N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; w( J( M3 K( p2 t7 H" |, ^9 A, _" n
do
9 B+ q$ ], g6 M8 H Lan := rootfolder.Internal.Tools.AOLlanguage;
, C0 E. ?/ R- P& `; t6 h if current = @.Destination -- else return
: R1 }3 y$ A5 a then
7 {) g3 g# o% ]" O" `, u0 S( o @.Destination := void;& f; z/ J1 \4 e& k
if @.occupied then
0 r, e6 L" e- f! ? part := @.cont;
/ R9 a# `" c# C8 r @.transpOrder := void;
7 E2 g) v) a2 K, ]% ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( m8 _/ ? s; @8 e
@,root.eventcontroller.simTime);
% B1 G9 H7 p3 G6 w2 U# T7 ` @.HasOrder := false;" m# h! p9 {5 x5 H8 r
@.DrivingHome := true;
2 U, c# w5 ] w: V0 I) b rgManager.tryToStartTransOrder;
: R7 H# `2 t7 D, n- v1 Z# N if @.Destination = void* M2 _/ Q7 `2 G) }
then -- no transport order for vehicle @
1 M2 I* i! X- t1 d. p @.Destination :=
3 l( Q, Q/ ~ b- p3 u9 F; x rgManager.nearestFreeStation(@,track.~);; ~* Z Q- J' T+ I) t; x
newDirection(@);
1 f: G9 K/ u3 ?7 k if @.Destination /= void then) @" U' }) R- N4 Q" M
@.Destination.NumReservation :=4 v2 k) R* e/ J
@.Destination.NumReservation + 1;
- q1 z6 { P6 c, ]0 A+ ? end;
( S; }0 k" y" l& U- Z8 j0 C @.CurrIcon := "drivingHome"; y1 }: B) Y+ {( `' Q
@.DrivingHome := true;
' R4 Q, j; A {8 f2 \& W$ ] end;
* {; R( w5 r% H' ~# r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) W6 E: G. H5 F part := @.transpOrder;! _% b( N) _/ o6 l
part.move(@);-- load part
1 x. y) \8 d: }! P. Q9 f5 n! H @.CurrIcon := "load";
* X" b6 A/ \' P GlobalDistObj := part.globDestination;
q; g0 X! d+ U assignLObj := rgmanager.rgAssignL;
8 X; M, J/ d! e0 |. Q7 l* d+ j5 H row := assignLObj.getRowNo(GlobalDistObj);& y! \9 O! O; N* h$ J) |# q
if Row = -1 then -- since 70
" F8 r. F, s1 K4 U X, A4 [ if lan=1 then# ?9 u- ] k" m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) R* v* F' X+ r: X
to_str("in der Andockstation: \"",?.~.name,"\""));. X) T, w& C* U, w+ b5 Z$ e
else* |; K8 K2 O0 e/ d: _ |- v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) t: `( i% k; T% Y) X% s! o& @
to_str("in docking station: \"",?.~.name,"\"")); 1 y+ A7 _4 Y5 [. v g
end;
/ }. ~8 L- y# |, }/ T& c else
4 u: n$ \( Y2 z+ ]/ P3 r1 G% {4 s @.Destination := assignLObj[1,row];
V! j; t" I; Q; R$ u: C% J end;
3 \1 ?: {. |9 d7 p/ q' T' m: Y newDirection(@);
- B# l* s1 _! Q8 g8 E. i @.HasOrder := true;
- A: t1 } X6 H; g1 A4 H, H end;
$ q1 H- J, _' _* v# | end;: z7 i( Q5 A. _0 P/ m
end; -- of the method: I, ^2 ~ B$ E, ]0 Q; j. @, o; o
|