/* called by: entrance ctrl of the object 'track'
7 E- Y! |: {- M* J8 b; \*/- {+ p- g7 ?$ b
is( N9 l3 L/ w c3 A0 Q3 X4 t) m1 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" m, B3 S; W! o) vdo9 c- \" X4 X8 s8 U- Q+ f' Z
Lan := rootfolder.Internal.Tools.AOLlanguage;+ {6 }3 R+ k. j; n! \4 d) |
if current = @.Destination -- else return) [& ?, j3 A B$ [) u+ b
then, Z: g: }* _: p @7 J# ?
@.Destination := void;
& ], I! u# V% T; A if @.occupied then& u3 K1 `9 D* T
part := @.cont;4 M* v& \ J) k
@.transpOrder := void;6 F( e0 g8 C3 [% K( Z v" P; q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 o5 U& g' U- S7 W7 M; E" b1 i" U1 M$ S
@,root.eventcontroller.simTime);; A( P8 I% c8 [3 _' E
@.HasOrder := false;
( A6 c3 v4 k9 V/ e2 P @.DrivingHome := true;
/ h# v2 ^) u8 w9 l rgManager.tryToStartTransOrder;% L0 ?( \; s$ \8 c* b7 }7 X
if @.Destination = void* X: u6 n, `& c( Y
then -- no transport order for vehicle @, p8 X9 O, I; `3 f
@.Destination :=6 J: I4 l2 {. g2 |7 K
rgManager.nearestFreeStation(@,track.~);
! F7 F- z# Z* F z newDirection(@);
! H1 C; D. U7 d: p- l. E; G3 U if @.Destination /= void then
" l( O) Y. s2 S$ U* Z @.Destination.NumReservation :=
1 B' P' S* J5 t' I# n @.Destination.NumReservation + 1;0 c" I& Q5 s: _+ E' V8 D
end;# v% J: B* m5 `2 s% |
@.CurrIcon := "drivingHome";
9 n4 ]6 Q/ Y$ X# K8 ]% k @.DrivingHome := true;
7 P. W" R' d, P; f) c end;2 u2 s+ s m3 H# q6 `$ l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 l- W4 R+ o$ q" `) F part := @.transpOrder;
9 o0 g0 N$ `# Q& r) \) R. F( O$ N part.move(@);-- load part
1 t' |- d* y% z6 T, V @.CurrIcon := "load";4 Y# c: O4 X/ u. i% h8 w
GlobalDistObj := part.globDestination;5 x8 q2 @2 d6 c2 Q; G1 ~# e% k
assignLObj := rgmanager.rgAssignL;
4 a6 g( |2 \1 F4 k# h# z* i8 a0 [ row := assignLObj.getRowNo(GlobalDistObj);
2 r5 W3 x, C0 n9 j if Row = -1 then -- since 70
$ ~ }& g+ r7 \' l if lan=1 then
/ P- d- K" X9 \+ u% j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- n! c v" i# ]* J9 b to_str("in der Andockstation: \"",?.~.name,"\""));! [5 Q% u% X7 p& e
else2 k2 m) t: L# M3 W$ t, s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 `2 i' p% C+ c6 H, B9 M! p to_str("in docking station: \"",?.~.name,"\""));
& e: J, ]4 R% _+ W% _0 D$ ~! M end;2 @ Q, x8 M% G6 P' Y
else9 M; }9 G, A7 ~9 {4 ^
@.Destination := assignLObj[1,row];
" i, s" Q K1 h1 c1 @3 l end; " x8 x J8 [4 N6 u; Y; z, x7 ~
newDirection(@);2 r0 y+ J/ P8 a m( T9 {; x
@.HasOrder := true;
) M" M3 c, q% l4 R; N2 ` end;
: C2 d9 u- I- |- K2 @2 i5 N& Q. R0 g end;
- ~$ s$ w9 o/ k& Jend; -- of the method; H/ k# H/ d" I, f9 j
|