/* called by: entrance ctrl of the object 'track'
+ Y; _! I5 [; a1 L7 K5 p# ? u*/* K6 C- j/ \4 j3 v0 Z: t3 N
is) K0 F7 h) g |0 } J# C" I% `9 |# y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 {5 h& o3 x; G! m2 Z5 A0 h' s
do/ d6 W, i5 E) q4 H; [
Lan := rootfolder.Internal.Tools.AOLlanguage;
' E9 k+ p9 e6 y8 o3 e S if current = @.Destination -- else return( m. ^: Q3 p5 p
then
+ S0 c7 W6 e' l% r @.Destination := void;
$ |" v$ c8 p: Q0 }5 e if @.occupied then
e" d# J5 F z+ d+ D1 v& r part := @.cont;
$ F0 q; L7 m1 b, b# L @.transpOrder := void;
, |7 P) c( d6 {- `" u5 d' t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, G/ ^- h x K% j: S/ @+ k6 m# j @,root.eventcontroller.simTime);
5 P Q3 X. w' @2 l2 k: k6 C @.HasOrder := false;
# k1 ~; G) g8 c! f @.DrivingHome := true;) I: s* _* h7 w ]$ P, T4 X, E5 `
rgManager.tryToStartTransOrder;
8 b- a* M X+ C$ Q) F' [9 W if @.Destination = void; G" X Z9 X6 l
then -- no transport order for vehicle @
4 t- ~1 l7 b ^3 m: {( z# ^( S5 S/ u @.Destination :=
: H( O4 a, S2 {$ z7 \0 o0 {4 o5 P rgManager.nearestFreeStation(@,track.~);
) ]9 |) }7 u, x* Q% V8 \ newDirection(@); 0 l# X& v0 l1 D! p5 E
if @.Destination /= void then2 c; K0 Y, k, R" X
@.Destination.NumReservation :=
+ A6 `) \% A# B @.Destination.NumReservation + 1;
3 j8 o S4 g. W end;
7 h2 ~4 p" _/ Q. Z @.CurrIcon := "drivingHome";" t& C# r, W# K3 X z$ u1 G c$ k
@.DrivingHome := true;1 n S5 j6 t6 } Z+ Q& T) Z
end;
4 k5 y$ a) C& q. b' K: X else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 a5 t0 ~, u, M4 g- B
part := @.transpOrder;
: r. B* V: e5 _7 ^ part.move(@);-- load part
" c9 ?* n' D- P6 X* ]6 z @.CurrIcon := "load";
, o5 S6 i- h% n3 B) U5 I- k GlobalDistObj := part.globDestination;
( S$ A Q- K1 m5 ^- `" N; | assignLObj := rgmanager.rgAssignL;: V6 i! C0 ]8 Z% W; ?! g
row := assignLObj.getRowNo(GlobalDistObj);
$ }- g5 [8 [4 u9 \: T7 f if Row = -1 then -- since 70' s( J1 ]: ?* e f2 y: ^; c
if lan=1 then
2 n+ @( u' t, k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' d3 ~0 ?1 M# w7 W/ R$ [# K- g
to_str("in der Andockstation: \"",?.~.name,"\""));; s5 K" s0 B# [+ F, ~+ I
else
* K8 y! F1 |2 \( d0 b( W- [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 j5 P. j5 \( X& u/ n4 S0 Q to_str("in docking station: \"",?.~.name,"\""));
+ {, p+ W* n0 d3 r, M0 A* p; p end;# _) q$ m0 a. q8 ]3 B7 P
else
7 w% Z' H8 o( y5 V @.Destination := assignLObj[1,row];
* @! J9 D& p/ |) ~) G" Q% O7 \/ \ end; 3 H2 U# |- ?, M9 q( y
newDirection(@);% j* X7 \9 c" B" c- k
@.HasOrder := true;. T7 M5 q# F4 E1 a
end;
8 T& ]& b' n" m1 ]8 l+ N end;3 D* {5 R$ m0 |% \
end; -- of the method5 e3 d" g9 }8 y
|