/* called by: entrance ctrl of the object 'track'; @ Z7 N$ I, n9 f
*/
3 N: `4 `) N% h# G$ n. \7 W! gis
0 f1 ~ v B8 q: l# V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' R5 W' K1 g- U/ ]& Odo( }/ G5 O2 F0 S) Y
Lan := rootfolder.Internal.Tools.AOLlanguage;( W& E ~/ U6 @# {) r7 U
if current = @.Destination -- else return# S; e$ ^ U9 W R
then- p: S: w% n0 a" b2 S
@.Destination := void;* w3 D! P: j" @, t
if @.occupied then
; J% K, \+ _# r5 [; { part := @.cont;" N, ?8 V: I5 O* ?
@.transpOrder := void;' z9 c0 r& b6 m8 p' x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- H3 ?3 A3 i7 W( s% V" W0 B
@,root.eventcontroller.simTime);
! f6 j z4 A6 p# ?8 H4 Z @.HasOrder := false;
0 S! l. D1 d, R8 J- q5 \ @.DrivingHome := true;/ e5 {9 }6 q- I: s. X3 d- B
rgManager.tryToStartTransOrder;
' H0 `# g: O! ]- O if @.Destination = void; ^8 t, e2 T0 O
then -- no transport order for vehicle @. s" o& h% Q! y3 k
@.Destination :=0 D+ p- Q0 r1 }; D* Q6 r
rgManager.nearestFreeStation(@,track.~);
2 e1 ^ a( f* m/ q& U6 [$ e newDirection(@);
4 x, L) o# v) B5 K& l; k( A if @.Destination /= void then
, I" S7 }; _4 J4 \8 l @.Destination.NumReservation :=
8 f5 {0 z2 H8 X' l @.Destination.NumReservation + 1;+ V3 A: t" j, r7 Q6 Q9 t" s9 X) B
end;
( x! o6 ?) e- a) F @.CurrIcon := "drivingHome";
2 c. }# `" k$ R4 Q# x! `0 ` @.DrivingHome := true;
7 _1 q# J' s$ q2 w6 c- W) } end;& K& b% l5 r# j* K6 \& t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 ^0 r" n- }" d* Q part := @.transpOrder;
$ r* e! c. T& o$ I. ^; ^+ Z part.move(@);-- load part1 F ?0 K6 z+ I' c
@.CurrIcon := "load";
3 ?: N. v/ k" | W GlobalDistObj := part.globDestination;
1 @9 G7 [+ A! c assignLObj := rgmanager.rgAssignL;
/ M' _, B' s/ b r4 P6 d) D row := assignLObj.getRowNo(GlobalDistObj);
+ ^4 \$ H" J7 S4 n E, q" e if Row = -1 then -- since 70' `' y' ?! I% m( X
if lan=1 then! p0 h; a# b. p* F6 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, q3 @& d+ J! j8 [+ G' Q, A) O
to_str("in der Andockstation: \"",?.~.name,"\""));
- X( e1 M2 Y$ \7 M# X else
9 I' X+ d+ Q" `4 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& Q( _( D# i: e7 U
to_str("in docking station: \"",?.~.name,"\""));
' Y0 f* J' r. N5 V end;) I7 n5 C# L% G5 K4 T" |: T7 W
else
0 V, n* c7 C# G8 A4 f" o @.Destination := assignLObj[1,row];' b$ k5 N' T K, q# v! t
end; 3 w5 X4 M, V, W. Z. M s
newDirection(@);
3 D! {7 C7 i- N* w; u @.HasOrder := true;+ K6 O' _" b% }! V# |9 O$ \
end;
3 l) g) e! \( x) ]$ Z9 v( d4 K! m end;
V3 \" M5 C; g% {& Hend; -- of the method! R0 m0 i2 W2 n) M5 b" ~+ O; b
|