/* called by: entrance ctrl of the object 'track'
7 C" ~ h' ?' p* ]*/* ^- [) m- X2 `! C- _5 X+ R
is. C1 N3 b; y, m7 s3 Q6 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 `1 l6 X! s5 |1 f5 b- \: u
do
/ ^3 e' v$ K* K+ W0 I Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Q$ s6 Q3 x' w% G; O, Q if current = @.Destination -- else return# V6 e9 W9 Q# P6 g5 q
then
0 y. ]. M: k9 c- r: D$ L @.Destination := void;
" r5 J8 X& K0 q, Q) f8 e8 M if @.occupied then
# T" |& X% v* U- [/ R part := @.cont;2 S. B/ M- w% G" L" L" x
@.transpOrder := void;
* ?6 T' u% c1 N v# S; K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 @- a% o5 O6 j
@,root.eventcontroller.simTime);
. c, F) W3 u9 B* G- Q @.HasOrder := false;6 U: ~" x) [: }8 N, f
@.DrivingHome := true;
3 j+ F6 s& F& l, y/ q; g( S rgManager.tryToStartTransOrder;
; l) s" c1 E' E( T if @.Destination = void
, M% H1 P0 j9 ^1 G' l6 Z0 T then -- no transport order for vehicle @
0 K# p9 Z8 M2 m( k @.Destination := c. A# s+ f! v7 m
rgManager.nearestFreeStation(@,track.~);, P0 q9 y5 z8 |* o P9 Z6 m
newDirection(@); 0 y/ Y0 |, H' c+ _+ V
if @.Destination /= void then
! P) x* S4 B+ h8 Y+ A @.Destination.NumReservation :=
2 ?) O. V/ @% |, D @.Destination.NumReservation + 1;) D4 F0 w+ z( k" X! _
end;
0 p; k7 n% D9 t9 M8 Z$ T7 [; _, m! F @.CurrIcon := "drivingHome";
6 w1 u9 t, S% H% X- T @.DrivingHome := true;: w7 R7 n3 Q0 J' K; z) ]
end;# z9 O/ k0 ?1 B0 e% o) {# j, o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d: f( J( w/ M9 k. }2 a part := @.transpOrder;: m2 ~( P( k3 {8 Q# i, H
part.move(@);-- load part4 c3 r( V. O) h" q
@.CurrIcon := "load";) E: B5 Y3 o0 X! ^$ X3 M+ O
GlobalDistObj := part.globDestination;0 a' Z2 c7 s# z0 r1 U/ ^
assignLObj := rgmanager.rgAssignL;
, h: o- S# B$ i1 Y, d row := assignLObj.getRowNo(GlobalDistObj);
4 P% _7 o& J! @1 i7 c4 B0 h if Row = -1 then -- since 70& c. k+ {, T9 D( c9 d1 k H
if lan=1 then
6 L0 w8 Y1 G$ l( j0 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 O# Z) s+ A; y1 F9 f* n
to_str("in der Andockstation: \"",?.~.name,"\""));2 M. I# p/ p& W" P& W8 o
else7 Q/ Z0 c( k' N5 i, [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 h+ o7 c. i9 z/ L6 ^
to_str("in docking station: \"",?.~.name,"\""));
$ M/ _+ U; }% E; ~4 b. ? end;3 D& o9 F, [2 i& v
else: U4 l5 I( ~' h" Y) ^9 m
@.Destination := assignLObj[1,row];
1 ~6 ? m. Y: l# n end;
/ ]1 A1 S1 Y% a! p9 ^+ G newDirection(@);; ?) q+ t% l; W% S7 U
@.HasOrder := true;
2 z) g c" T$ A4 X$ q9 N1 M* W. T7 u end;
4 ?# u( {% T) S" T+ x; y end;
2 M# K: Z; s1 iend; -- of the method. Y, d6 b5 d1 e3 l& K
|