/* called by: entrance ctrl of the object 'track'
, O: `2 s$ o2 a0 \9 x*/
. D1 f2 a2 Q, s3 L9 Y5 `is- C, R7 W0 N0 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
m% V9 y" g+ d; H2 D) k, ldo
% a' H+ [' f( |4 J7 Q; g Lan := rootfolder.Internal.Tools.AOLlanguage;# I! x/ K$ \ |! {; d2 o5 Y
if current = @.Destination -- else return1 Y* T* j; c* x
then$ N) c2 F6 F! |" I
@.Destination := void;1 D4 a8 Y3 ?+ u1 s; u/ b
if @.occupied then
" p" N/ Y0 B+ x4 e part := @.cont;
! F4 H& y2 h' W @.transpOrder := void;0 ~. O- N& \) e1 l7 E2 s- S+ l: {5 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 r+ T( i3 [; S9 Z. A- [
@,root.eventcontroller.simTime);7 T6 U5 ]+ L/ Y9 b- W
@.HasOrder := false;2 X& }+ h! N7 O' L
@.DrivingHome := true;
" ~+ w! o, S$ }5 e' t rgManager.tryToStartTransOrder;
6 m$ D# l& [$ g1 u if @.Destination = void3 k" U5 Z7 o1 \8 y4 h0 K
then -- no transport order for vehicle @0 C; P4 g7 d7 W/ T& a
@.Destination :=1 k: p" D# }2 g# _, H
rgManager.nearestFreeStation(@,track.~);! o7 u+ z+ `. b5 Y
newDirection(@);
" G; l; D/ W5 ?- l7 u if @.Destination /= void then
% Z8 C/ \* {- u: g. ?) i @.Destination.NumReservation :=
) ?( u6 N$ x/ L0 x9 B/ @ @.Destination.NumReservation + 1;
. P7 W- l8 w2 h w/ L% d; i% [ end;
6 m% n( F9 _) J" E; O @.CurrIcon := "drivingHome";3 f# T) s/ \2 {/ p- p+ y' R
@.DrivingHome := true;0 S2 F9 }& l o
end;+ i% x" Y/ z3 {7 s- a7 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& f* u) g6 x* n9 d7 m% Q0 H9 Z5 v part := @.transpOrder;
/ i/ `, k2 s* F B# [5 ` part.move(@);-- load part& ~' ~ E4 Q- E* l2 ?8 p1 k9 o* a
@.CurrIcon := "load";3 z/ n- [ J, F/ N. S+ e- j4 i& f
GlobalDistObj := part.globDestination;
) E- t, S. i0 }0 L assignLObj := rgmanager.rgAssignL;
% ~0 ?( t7 j2 t$ E5 M& L T row := assignLObj.getRowNo(GlobalDistObj);
W( L8 {3 Z# V7 k1 X( X% v& x2 {7 ^ if Row = -1 then -- since 704 P; f( B! H5 Z& z- w4 S; Q
if lan=1 then: R: J/ R2 t, N' w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 R$ I( a0 ?' w( F5 ] to_str("in der Andockstation: \"",?.~.name,"\""));
7 Y: N( M2 }$ d$ j, u4 i4 H. x; ` else4 p2 Z7 N; }' Q4 U7 f! E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- d, ^% X/ f1 K1 Y7 k4 R
to_str("in docking station: \"",?.~.name,"\""));
$ y9 H/ D1 C( ^) u2 B* l end;
9 m* I# H b' ^* B' h else' L. F. p& K; y* ~8 ]+ |9 P
@.Destination := assignLObj[1,row];
) o" m, y" x+ \4 u0 c: a( \/ r1 d end;
% t& X9 L+ G% I1 K newDirection(@);3 g! u* }- Z$ C! B! p: t; R
@.HasOrder := true;
. p* ~9 e S5 N" a* ?8 [ g! c% s end;
0 Y- r2 x0 z& E9 X$ O( w; X8 Q3 }! u$ ^ end;# Y4 e' _2 c8 N% Y0 I3 J7 O7 q
end; -- of the method: |1 ^2 H+ `/ t; P- `# D
|