/* called by: entrance ctrl of the object 'track'
% y( B. |* [, Z" ~' G*/
. l% Z3 m7 l) @; I. S& o/ W' Jis0 i8 W P0 ]) n: G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. a; A6 K% \- F
do
/ n# D$ o0 k- |4 Q Lan := rootfolder.Internal.Tools.AOLlanguage;8 C/ C. q& V u+ t% F
if current = @.Destination -- else return
/ P b/ K: e+ s# A- _' N$ H then
: f- t' G1 P: y9 [% y @.Destination := void;
: j2 L6 ]. R) ^; _$ E4 @ if @.occupied then
6 I% q& J( E7 t, ?) V& ^. ~4 A) T! ` d part := @.cont;
1 ]% O3 J$ M- u9 f: E @.transpOrder := void;1 J- {) X+ ^) Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ?7 H; J0 |0 S1 a @,root.eventcontroller.simTime);
3 d) r: }: G# N! L4 a- M @.HasOrder := false;0 O) r& I+ k$ _8 M' D9 a
@.DrivingHome := true;
7 t% H9 I0 J) I5 a5 `% J4 u rgManager.tryToStartTransOrder;
2 j* C3 N( W1 k4 c _3 i$ ~& n; I if @.Destination = void0 T6 G8 n4 m( {( t, [9 \: u
then -- no transport order for vehicle @9 h) J8 F1 y# ` h
@.Destination :=9 Y- I# e8 a$ H$ V( ?& {
rgManager.nearestFreeStation(@,track.~);
+ J8 U" A5 I( Y& \ newDirection(@);
- k9 e2 Q8 ?5 A9 Y( x N; j( R if @.Destination /= void then
% L+ A; U2 i, n" |8 f @.Destination.NumReservation :=
' r. f9 P' Y' ]) ?5 e @.Destination.NumReservation + 1;
- U& _2 w& e4 T V/ e& M9 b end;/ G" Q# k$ ~' Y. u2 P; O
@.CurrIcon := "drivingHome";. i+ g6 J) N3 M3 o! e, d
@.DrivingHome := true;
8 D8 e2 j& r! X! r* P' b end;# r& H' U% e$ d! b0 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" g. s2 I& p/ N! k' ^+ H1 k( l, n
part := @.transpOrder;
* _: {" A$ c9 j7 x( x$ J- ^ part.move(@);-- load part) o( `& [- a3 I% d. _+ g
@.CurrIcon := "load";, D4 Y% V7 D- G2 U- c3 k! f
GlobalDistObj := part.globDestination;4 Y0 f3 q( o6 |5 R
assignLObj := rgmanager.rgAssignL;3 c( @6 N6 q, c3 s. `
row := assignLObj.getRowNo(GlobalDistObj);
" ?8 K* e9 g2 Q a# ], N if Row = -1 then -- since 70
3 L6 S: t8 q# `1 [ if lan=1 then
# z7 t7 @8 S/ U* `) Y$ h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- m. M( l* m% V1 M) s to_str("in der Andockstation: \"",?.~.name,"\""));
1 V: b$ @( ]) \ else
# E' G3 P0 a4 b$ } ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 D% M0 S$ ^8 G6 _
to_str("in docking station: \"",?.~.name,"\"")); ) o- l0 ~& G8 l1 o0 t- }9 |% y
end;; f' g& {6 q n
else9 O9 l& y2 P% a
@.Destination := assignLObj[1,row];
5 a" V9 y+ h& V) Y" S6 d3 o end; $ C+ W1 g H, o4 |8 P/ O$ ]& C8 {
newDirection(@);9 e: I, w+ S* {( B; X
@.HasOrder := true;; O& D' H+ J) h6 A9 ~ S: d; W
end;( Z7 Q* c' m; w8 l
end;7 i6 r1 u* X1 Z# U \1 q
end; -- of the method8 U* S( t+ h9 p4 g2 ~7 M
|