/* called by: entrance ctrl of the object 'track' q, `' J% ]( O2 l1 [7 ?8 e
*/0 G$ `8 ?5 Q# T' O& `: ?1 j
is
/ {* P/ _( J: k! d6 `2 N7 t8 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 c) J! @; r* L/ c1 B9 K* q5 S3 w1 ~
do- e& v8 H3 P* w* \4 {
Lan := rootfolder.Internal.Tools.AOLlanguage;; S! a l" J/ c0 r+ ?
if current = @.Destination -- else return6 L, O$ d; w1 G2 i
then- n m" U4 \3 [% K0 _2 }
@.Destination := void;
9 |, M. ^- j3 K if @.occupied then; Z! D4 J+ B3 B7 Y4 o4 E
part := @.cont;# ?* y- v# |% {% a* k2 \
@.transpOrder := void;
/ m" e' |& x+ X0 h4 g% r) S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- z" |. k$ `6 W }* B
@,root.eventcontroller.simTime);
% y' i# G% F9 w5 _/ F @.HasOrder := false;
/ X3 B: X# y8 }7 ` @.DrivingHome := true;* R' W& S( d8 Y) d5 x
rgManager.tryToStartTransOrder;
& D) q+ W! M% O. B; g6 T if @.Destination = void
) t; G, C5 u( n) f% k* [ then -- no transport order for vehicle @! s/ R+ D4 c& C; ~# E9 V5 b
@.Destination :=
: Q6 s& ~/ V% L$ }7 R4 d rgManager.nearestFreeStation(@,track.~);& g3 c( Y G2 U w0 Z; M
newDirection(@);
2 B- o: q2 b- v/ C4 I if @.Destination /= void then
; q& M- E! i# |0 T @.Destination.NumReservation :=
: \8 a: o: [5 O( l% e! C5 y @.Destination.NumReservation + 1;
! O) C! D8 m& C( v" h end;
z) b7 Q; t" N @.CurrIcon := "drivingHome";. L- O7 Z v, {( f% | y) l" Q
@.DrivingHome := true;, g* M* F- Y }% U8 I
end;# k5 |* h$ x( B; G, N, e& _/ j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, ~/ H( {3 D" ^$ t' U3 ] U* R part := @.transpOrder;
* a# ~7 G2 e, N5 X part.move(@);-- load part
2 M* K7 p. d! G& J4 w @.CurrIcon := "load";
% H8 G: u: p9 x4 p0 w GlobalDistObj := part.globDestination;! ^* r( y; b! o; n, @
assignLObj := rgmanager.rgAssignL;
; b8 X- ?9 Z8 `, G* T( | row := assignLObj.getRowNo(GlobalDistObj);
* l% Z; B8 ~$ h% w$ \" } if Row = -1 then -- since 70
7 W, ?* e7 q( [! r1 E if lan=1 then
' n& I: l( g2 t W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- e$ [ w, \% ]- i$ { ]) b
to_str("in der Andockstation: \"",?.~.name,"\""));* V) m+ o1 v; q+ ~
else. z! K; b0 c/ y* l4 Y' r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 N0 B" ~7 W% @' V) X8 m& W
to_str("in docking station: \"",?.~.name,"\"")); 6 L- |7 ?, Y1 I% J, `! I; P! S
end;. ?% W" m2 ]( T
else
% o" t- h/ c% U' f- F @.Destination := assignLObj[1,row];
: m9 v' ]9 W7 K( ?; v0 @5 b end; : o" C( C: F9 t' a% ~
newDirection(@);# F* _ d# p) R( O! E/ i. Q( `9 S. n
@.HasOrder := true;
9 F1 P( D; D; K. M end;: _. q [6 p/ ]
end;
# D( C+ g1 c. |end; -- of the method, @) ?" C2 V- F8 V: o6 N: ?
|