/* called by: entrance ctrl of the object 'track'( t6 s2 C7 b" G3 R
*/
; r0 O; ?( Z; _, U3 N2 u6 |9 yis
& H2 {" V! S3 ^- \- F part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 H2 m7 B/ T& x! O; o/ X7 {6 ~ z
do- F* r( l$ _7 x. X6 n7 j
Lan := rootfolder.Internal.Tools.AOLlanguage;
, e, _ Z# t: X) D: I4 ]8 s# v8 y if current = @.Destination -- else return" w: b" n5 \$ j+ i/ a) |
then
W+ R" }6 N% D8 v @.Destination := void;
( K8 C5 J! h/ L6 E6 O, _1 e if @.occupied then" R' f/ m0 a# }
part := @.cont;
3 F5 J F+ e3 L9 w2 n+ E @.transpOrder := void;" B* c5 T- `0 J1 f$ J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ?7 m6 g0 ?; A. f+ K
@,root.eventcontroller.simTime);/ h0 ?% z* U+ d b8 @
@.HasOrder := false;3 d& I; Z& W; b( z6 ~( c, M
@.DrivingHome := true;
4 F' o9 E% q5 R2 ^/ a rgManager.tryToStartTransOrder;
7 w1 z, H& h, t3 H if @.Destination = void3 u* A0 m, g' }) f2 m) x
then -- no transport order for vehicle @
% O1 J7 S$ b/ z) d8 g } @.Destination :=$ h {7 o9 Y& _4 x9 Z
rgManager.nearestFreeStation(@,track.~);: v2 \; m j7 M5 _
newDirection(@);
+ R4 \* W+ a4 \ n# K: [ if @.Destination /= void then: v1 n( @5 A8 N, v
@.Destination.NumReservation :=
1 T, ]+ C) _. Z# r' B( Q# z7 i @.Destination.NumReservation + 1;' h- s0 ^( S7 X: P5 c9 V
end;. _4 C! h Y/ q' F2 K' r+ |
@.CurrIcon := "drivingHome";
* _# U' v. M3 R: S1 g7 b" Y @.DrivingHome := true;* c3 h' Z/ P0 U- U
end;
# |2 s( ]* Y8 C; N$ _% S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% d$ z* v: H% L9 H" @6 } part := @.transpOrder;
* } R, y+ ]2 m8 W1 ^! h! C part.move(@);-- load part. Q$ P: P5 i2 w$ |/ n
@.CurrIcon := "load";
q0 R& c. e' {! m0 d; p' e GlobalDistObj := part.globDestination;
V& C! H. F0 C! V, K* Y assignLObj := rgmanager.rgAssignL;0 S+ Q0 s- H% u5 r9 Q
row := assignLObj.getRowNo(GlobalDistObj);& M* L4 `9 S7 y6 K
if Row = -1 then -- since 70# o' d( r& E1 X0 C3 l
if lan=1 then
: {3 u+ U" ~9 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: m; q9 j8 \" g# `
to_str("in der Andockstation: \"",?.~.name,"\""));
: _3 S' C4 N% z$ y else0 I3 q$ Y0 S/ n% D$ ]: z/ x! n1 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( e. E2 y) V: D to_str("in docking station: \"",?.~.name,"\"")); x% N. H, _8 r% i- i
end;
0 H* ?! `8 d& _9 B3 e, s else" e6 V) u8 S# x- w& V
@.Destination := assignLObj[1,row];! H/ U- f% \' x7 N2 p7 D6 M
end;
: V( D5 _5 {4 k/ g1 P newDirection(@);
9 U( K% S3 [0 h3 t; y @.HasOrder := true;* Q: o# f, Q; W. m* b N2 ]& K
end;
2 W+ j! j, R2 q5 b# g% {. I" v end;! e8 l6 v) j1 u$ f( j( z
end; -- of the method; s; r' W2 T0 i6 w, Q
|