/* called by: entrance ctrl of the object 'track'
0 p, h! x7 [8 S1 L" ]! {6 _" H3 G*/
% h( Q9 h" l+ f i3 vis
. z1 o: w! y5 D. H7 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. s' D, u) B- ~2 S0 `# ?) ldo- p* d; [! m" B4 y
Lan := rootfolder.Internal.Tools.AOLlanguage;1 q* {# I4 Z2 Y6 b. M- o" O
if current = @.Destination -- else return& H/ z6 N( F2 u: F
then4 V; [4 {0 v, Q7 l
@.Destination := void;
6 \0 n. ~3 W0 E( T9 B, ]9 x$ Y if @.occupied then, v1 k) |7 Z0 n
part := @.cont;
+ s& |. R& W3 L* K' N7 G: K @.transpOrder := void;
9 X. H' i0 C! L7 P* {) T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 n: {- c3 [" K; Y7 g8 Q @,root.eventcontroller.simTime);
, [% q( J0 w- Y- D$ q& c3 X( F7 l @.HasOrder := false;
z6 D- t) U: `" u, K @.DrivingHome := true;
$ k5 N. p' o! E/ x g rgManager.tryToStartTransOrder;9 z: \& }( V: x1 \
if @.Destination = void: s, V/ R) a, @
then -- no transport order for vehicle @
8 [( R+ y2 M7 ^0 f* ~5 ^8 s @.Destination :=
( b% W& F6 e! x& S* _ E rgManager.nearestFreeStation(@,track.~);3 S7 p# |9 h1 }+ O; E( R% {( H) c% J
newDirection(@); ) T: M: v5 r& d5 R7 Y Q
if @.Destination /= void then
8 S/ E1 t; X+ J* T( z* @: e S: e9 F @.Destination.NumReservation :=$ A& J* A; A: t4 H
@.Destination.NumReservation + 1;
. A6 H" k! X. d+ y3 u end;1 N8 b9 p0 m- o) V; r; u V
@.CurrIcon := "drivingHome";1 b" l0 C- n0 y
@.DrivingHome := true;
/ o- O2 p6 R M- e$ V- e+ e end;$ f: V0 \1 A7 k. \* i0 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! E4 Q' k g: J6 p: X1 ^1 l part := @.transpOrder;
& K+ L6 e1 ~" u% i9 r part.move(@);-- load part$ p8 y' _6 z) G( b
@.CurrIcon := "load";
8 z7 z; e/ O" V GlobalDistObj := part.globDestination;
( L4 |5 H1 i% ~5 w6 ]& y assignLObj := rgmanager.rgAssignL;: _8 o! P/ F9 }4 {+ |6 \
row := assignLObj.getRowNo(GlobalDistObj);2 U# V. _ w; j) z. s l
if Row = -1 then -- since 70
7 h5 C6 _0 q- R9 Z) l0 m) v if lan=1 then
1 ] _" ?2 B5 q: x; R! a7 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
N$ e8 z+ v' H& A4 z/ Z to_str("in der Andockstation: \"",?.~.name,"\""));! t! k$ N. e/ r+ _* @! F/ ?* {
else/ _- P. l5 d5 h& J. q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( j6 X) [) L$ X; V
to_str("in docking station: \"",?.~.name,"\"")); 4 y) p( B9 U1 X0 g, I
end;1 c8 r2 P! s4 t( t/ X, x
else
6 g- t- r5 v3 X A7 F @.Destination := assignLObj[1,row];
7 V/ t: _) J- B p8 U1 P. K end;
: |6 O% c. ?. I2 A; k+ f% c" X) A newDirection(@);- K# |- |3 R( o) ]3 ?
@.HasOrder := true;
. }3 E& e+ b: K/ s p3 ~2 R end;
; l( `+ b+ \8 f end;
; k$ o8 K8 r6 cend; -- of the method% `7 r- X e/ {8 J! `2 J
|