/* called by: entrance ctrl of the object 'track'# O' i. Y8 B) A; r; [
*/
% }3 w' Q! y8 H5 f9 zis3 Y2 W0 x; D$ O% ^) k& ? h, b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. d0 ?& t T5 d- @: l8 L k( y. K4 zdo1 z# k2 ?( q, \# u( D8 ?& H2 P
Lan := rootfolder.Internal.Tools.AOLlanguage;, x' z3 k* f# c7 y
if current = @.Destination -- else return( J1 R; k' p8 k6 v! S; ~
then; }0 A" M3 V# u6 F
@.Destination := void;
K* \2 U' A. G5 B9 ]1 G/ F if @.occupied then5 Z. I3 l' Q- u& i5 f
part := @.cont;$ e7 ~" {& { G4 U
@.transpOrder := void;1 o# ]% b+ {' _( M. r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ N9 `. o& ^4 B9 p @,root.eventcontroller.simTime);* c4 A- u5 a2 _5 w, `
@.HasOrder := false;5 |! W/ |! u3 r \3 y
@.DrivingHome := true;
$ \- X" J3 O8 f7 A: ] rgManager.tryToStartTransOrder;
$ |' f2 r+ X9 `8 E8 [1 o6 Q$ t if @.Destination = void
4 C2 o$ r- E+ b. _1 b then -- no transport order for vehicle @
8 L' E! B+ R2 c% O% Y9 {% ~: [ @.Destination :=' x- B! y% w2 G( ?0 u y2 [" Z
rgManager.nearestFreeStation(@,track.~);0 M' ]6 ~- c( u0 C
newDirection(@);
0 b. U$ s6 V4 w7 x3 j. A if @.Destination /= void then
( r2 U2 C% A- x( s$ t5 h @.Destination.NumReservation :=
9 f2 {4 r6 S6 \% B* A- a- l! t @.Destination.NumReservation + 1;
) @ h3 s0 v* v/ ] end;- [' o( N' P) r3 n* q" Y8 Q
@.CurrIcon := "drivingHome";
6 o1 y2 g* R5 S1 L @.DrivingHome := true;) B* _7 e" K V* @8 ]2 S* T
end;$ }/ O, t+ m0 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. Z0 B5 g! r8 h5 U# |
part := @.transpOrder;
( o1 e, o2 ]2 y/ M! ]! f, e7 q part.move(@);-- load part
9 X; F% j& M' T- d: Z7 ]& A" E2 N @.CurrIcon := "load";
) q4 m: t E! q+ o" E6 q GlobalDistObj := part.globDestination;
1 D. R* H2 j" }5 z assignLObj := rgmanager.rgAssignL;
2 w- g* q$ g$ f9 v/ ~ row := assignLObj.getRowNo(GlobalDistObj);
7 @3 ~: @+ W' o6 e$ t/ J: n! Q3 p if Row = -1 then -- since 703 X) t1 T7 v3 a9 n
if lan=1 then
/ A ]; k+ t3 N- r% \0 I0 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 K9 z6 h4 E& h. i5 ]. L to_str("in der Andockstation: \"",?.~.name,"\""));
# {( U ~+ d L! g2 g' Z else, C& w4 V1 E3 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( s" ?: m; ?$ I% k+ b7 e" M4 p! G1 I to_str("in docking station: \"",?.~.name,"\"")); " Z- [# Y5 N; J2 K7 o0 e
end;' A# Q& \' S& k9 F& I
else
0 b" g& M# _0 T/ A7 z* e$ \) B, ] @.Destination := assignLObj[1,row];
' |9 x7 Q$ L# w3 @) ^5 e) } end; 6 I% n1 q# v7 x. r: [( W( P
newDirection(@);
/ T( H6 u0 e8 [4 r, ^ @.HasOrder := true;
6 o4 B9 ^/ S' Y1 E) p1 H end;) t6 M1 Y$ ~" L5 k; e
end;
2 K x, x2 F- B r2 C5 n9 C9 U2 ?end; -- of the method
/ p F7 l0 A+ e, g9 B |