/* called by: entrance ctrl of the object 'track'6 P- C8 O( Q, V! O# J! p- o5 D
*/# m2 s% i& W. W) t6 b r+ B
is% u) x0 s/ h$ Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" w5 _/ w [4 }; R
do
F0 P9 Z! i0 O! T% y Lan := rootfolder.Internal.Tools.AOLlanguage;5 D! B- d; m; f( O K
if current = @.Destination -- else return
& b3 u- f, s* v then
7 X2 h* L+ K# K7 D7 M6 `3 T/ v @.Destination := void;! \1 O$ Z: l1 j, W" S
if @.occupied then
: ]) S# T4 O. ^6 W part := @.cont;
+ c' ]* Y& t$ M \8 b0 b @.transpOrder := void;9 _6 k2 f# B" c( b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 W, B% q; B: N6 F1 O2 g
@,root.eventcontroller.simTime);
6 X6 b, j/ B2 @' m. j; ~ @.HasOrder := false;/ S, b5 T( Y1 P. h- J
@.DrivingHome := true;
. k- a2 l, k. | F5 a rgManager.tryToStartTransOrder;! u3 K/ v( B$ [% A+ X+ |0 u
if @.Destination = void4 ^3 z9 Z1 v' O% Q
then -- no transport order for vehicle @
& A( U/ k3 ~8 ^2 v @.Destination :=
! |; ^$ `4 [7 O! P z7 O- W; e rgManager.nearestFreeStation(@,track.~);
$ w7 s/ t" o( f. \2 N7 r( S newDirection(@);
7 z* f k4 ?, T( j9 t if @.Destination /= void then4 U2 m6 q9 p+ T6 C" N
@.Destination.NumReservation :=/ C h9 C$ I! d" i
@.Destination.NumReservation + 1;/ d, }5 L! G3 p/ H5 x+ @/ C( c
end;
. E2 N/ m6 }# Y4 K$ `8 }) _ @.CurrIcon := "drivingHome";
& H0 ]6 n- K$ t. ? @.DrivingHome := true; }5 P) z/ ]3 [6 E
end; l- q k, X' K/ ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 F& d: J: h0 R$ J$ m part := @.transpOrder;) [2 q; `, Q- U; y2 }9 Q. `
part.move(@);-- load part6 |$ O6 S% ? | f% {
@.CurrIcon := "load";
1 F9 _: y2 ^8 j2 t1 z8 q" B GlobalDistObj := part.globDestination;
+ D, K1 `8 b8 B' I& S( k' R assignLObj := rgmanager.rgAssignL;
5 {# Z: U) K/ r7 n3 ^ row := assignLObj.getRowNo(GlobalDistObj);' ~0 P+ l. U+ ]2 z
if Row = -1 then -- since 70
& y4 }1 u% ?4 S7 I9 d if lan=1 then* _/ J! Y: w* J, g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 {- D. W+ B$ w# D6 h9 y to_str("in der Andockstation: \"",?.~.name,"\""));; T- x7 A d1 ]! v: e* f4 J; u. B0 l
else
[; O4 p* ?; A9 G& k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ w, J# R4 Q( x) H8 w
to_str("in docking station: \"",?.~.name,"\""));
8 z$ q4 R5 Z& u( j1 G end;' ~: S5 B* D- u& y8 V D
else
& b5 |. Z5 R( @ [ @.Destination := assignLObj[1,row];
- a; b1 w' o' e2 T, b$ B$ { end; ( z- u' u) _1 y* l$ \0 c2 j! q
newDirection(@);
6 z \6 [# y8 J& `. x @.HasOrder := true;: [* Q$ O- F1 ?; P
end;
# G) k- W( Z" M, t1 O5 H* { end;8 H9 y) ^& G0 Q4 {4 K
end; -- of the method v, X# d' o1 x3 p/ h: }+ [3 [
|