/* called by: entrance ctrl of the object 'track'
! M6 A5 l# g' W' R; @# z*/8 F2 }4 Y& x8 [) v
is D W4 J& l* J: ~2 l1 B+ U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 Y: g, a6 ~7 T- u- Ldo# q& l p- f, t8 s- }" A% @+ X
Lan := rootfolder.Internal.Tools.AOLlanguage;1 j2 I( N W' }7 Y: G1 C! x
if current = @.Destination -- else return; Y" S$ d' z$ w
then
5 [8 D- E7 D, k7 \: M @.Destination := void;
0 W% U% p5 E4 q if @.occupied then3 M3 p7 R' |7 Y/ Q: q
part := @.cont;& g8 e" l# y! F) g& s3 j' v
@.transpOrder := void;; a: k& M' b% q3 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, @. w' g: D4 g M4 p M
@,root.eventcontroller.simTime);
3 P& X. a5 J; u. v @.HasOrder := false;
: f% ~2 q" [( v6 B/ q; Y. P7 t @.DrivingHome := true;
$ I5 D2 S. M# [ rgManager.tryToStartTransOrder;
& ~8 n& l9 P7 ^, d( U# W0 ` if @.Destination = void+ }1 _4 u; T7 g5 F% q% z; {
then -- no transport order for vehicle @" y2 f% L: i4 \1 }4 `! g. P+ X
@.Destination :=
7 i# j/ m) u6 t' z rgManager.nearestFreeStation(@,track.~);- x# B2 ?+ x8 G2 q. y
newDirection(@); ) y4 S5 o2 J1 X8 X
if @.Destination /= void then! }! \$ i/ R. t' w8 n; ?. R
@.Destination.NumReservation :=# Z3 N# q% [6 E% @, D" j' h
@.Destination.NumReservation + 1;( [4 H& U6 d& r% s- Z" R9 o! k
end;* Q5 z i2 Q+ e( }, Y) D# W
@.CurrIcon := "drivingHome";
, o8 X! ?; ^% o9 B$ X6 h @.DrivingHome := true;
- Q( x0 i: a0 F- @; A0 S" I1 `( v end;
) n, W; [7 l6 z% x' D" X4 s1 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station* b7 o: b, @4 j1 q- w
part := @.transpOrder;
/ y7 @8 s0 G% k0 d: m; f* m part.move(@);-- load part
' y0 q0 [& E0 ?6 Z6 X @.CurrIcon := "load";, e* Q+ S7 i) {1 {4 g, O0 m: e
GlobalDistObj := part.globDestination; d4 E7 N3 W' I7 L4 C5 q0 J7 X
assignLObj := rgmanager.rgAssignL;
$ Z g" g4 D2 r) V& }) ^+ F' { row := assignLObj.getRowNo(GlobalDistObj);
$ d, b5 d9 X' w5 ^" s7 H if Row = -1 then -- since 70
! `( l* t3 I. F2 `$ f if lan=1 then
0 e( m5 V$ j) S+ E% C7 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* k, B4 o7 L" ?1 _+ B! H: I to_str("in der Andockstation: \"",?.~.name,"\""));% {) ]# b' ^2 a3 D& K
else* D) H) E$ ^( A! l) A7 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' }3 G( a4 w' R9 k1 z to_str("in docking station: \"",?.~.name,"\"")); : Y- H, _2 ~5 J/ o2 D
end;: p2 _5 C( E5 B* I. ~& |
else
5 [% u5 H, x& s! E: c D @.Destination := assignLObj[1,row];
; t7 D2 v A* y/ ?4 J2 `8 t) L7 G end; , l( a, O/ w% P/ K4 K! Q
newDirection(@);0 k* I$ ?& _( e& c8 T( k# f. X/ q/ {
@.HasOrder := true;
2 I6 Y0 ]* y4 m; ~% J! M$ x5 k6 z9 v end;; C+ N: u3 u7 y# s( _9 ~) T: t
end;
3 s# Y; x0 Z) n5 a7 i8 s5 C; Z0 a: Vend; -- of the method+ z2 p0 r) L: Z6 X5 H, d# L
|