/* called by: entrance ctrl of the object 'track'1 c; K; k! G c% Y" S: b
*/
- Q3 }, T9 W( N: w7 I. ^is* R4 f1 a" x9 U/ d* C: _0 q! a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 x. d4 T$ m" o0 Q7 `! C
do
, C/ s; A; b- e* Z; C0 C Lan := rootfolder.Internal.Tools.AOLlanguage;
8 e5 x+ |& G+ o: ]4 e8 m5 q7 f if current = @.Destination -- else return! W- o% p! C2 X3 P
then
8 u3 u! s4 N) y) w+ E( L @.Destination := void;/ q, N3 ?( a4 _2 k9 b4 t' B& g3 m
if @.occupied then
1 Q# b2 h- W0 t7 l part := @.cont;8 b1 ?' ^' x9 x2 a( H+ E3 t$ l5 ]
@.transpOrder := void;1 S/ j( q3 m& B% H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 g0 }7 k4 S; W7 s. @( ~
@,root.eventcontroller.simTime);( _2 P& h! a1 v0 A
@.HasOrder := false;) Y4 l; r+ _( i5 n
@.DrivingHome := true;
$ v. @+ D: f2 W rgManager.tryToStartTransOrder;
: y$ A: C* b/ H$ Y x if @.Destination = void/ a' U Y) E" S
then -- no transport order for vehicle @
4 ~1 t/ C2 i6 j3 y @.Destination :=
5 ~/ ]" e S/ Q+ y. U rgManager.nearestFreeStation(@,track.~);" m1 r0 t( U: d4 |* m
newDirection(@); 3 g9 q3 e1 e) |
if @.Destination /= void then
8 b% {# W% |) k# e @.Destination.NumReservation :=1 N$ D9 T Q6 l9 T
@.Destination.NumReservation + 1;5 e$ s1 X% `+ A7 ~: j+ ]# _
end;
, A6 C1 Q8 l j9 a2 G @.CurrIcon := "drivingHome";
3 c" M2 Q6 Z' P) |; `. ` @.DrivingHome := true;
: G0 x% q' e j3 L" H3 @* x* e end;
: \: [% m/ S3 p8 I5 T; E: h else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 e5 \6 F. O& @& U
part := @.transpOrder;
- B( J8 L l* M7 f5 e part.move(@);-- load part
$ ?. v/ H- a/ T8 ^ @.CurrIcon := "load";, [$ l3 s6 B* Q6 r
GlobalDistObj := part.globDestination;6 _" V) Z X. I8 h
assignLObj := rgmanager.rgAssignL;
9 ~$ C0 s/ e i7 C% A0 W3 b row := assignLObj.getRowNo(GlobalDistObj);
- ^% \4 o6 Y' i, G if Row = -1 then -- since 70# Q R0 ]( {/ e+ ]# U, p4 C
if lan=1 then6 ?4 j0 ?1 f8 A' [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ S# Y a3 q/ ?7 J' O to_str("in der Andockstation: \"",?.~.name,"\""));. ^9 | s4 X, b6 [3 y, E& M
else: ?3 N( k) |& |! o# Y) Z& q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 R3 P8 n1 \' L9 D2 |6 w to_str("in docking station: \"",?.~.name,"\""));
3 q9 {- n: q8 T8 A, Q' o end;
7 F8 ^& @: s2 v4 m' i( a else4 i. d9 p5 v3 K" |) q
@.Destination := assignLObj[1,row];
+ R) y I- I3 m; a/ {! B, D end; ( Q( F; R! y1 x: E
newDirection(@);
) i3 E" v P4 E+ Q. @! h* C# E @.HasOrder := true;! o7 f4 n7 l9 o% O; ]: u7 W5 `# ?5 p
end;
3 [* K4 p1 |3 H# t2 h* s# b& t end;9 Z5 A) v' Q6 @9 U4 F5 u2 d% ?
end; -- of the method5 X( T" F9 l# I0 \1 ~+ ~
|