/* called by: entrance ctrl of the object 'track', {; f, z8 E1 N- [4 x6 d
*/
( D: B+ p. O! P7 c3 [is1 g: b. d/ C, }! O" \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* _; K( V: d( r. Y- D6 o( A3 G0 D6 Odo6 E0 s; U2 A$ V" k* X* i$ r
Lan := rootfolder.Internal.Tools.AOLlanguage;2 y/ E; H3 W+ M8 f3 t
if current = @.Destination -- else return
# y; N5 [. ?- N6 P4 J& b( l then& [1 K+ ^4 V$ h) y
@.Destination := void; r, @6 s" s# F5 E0 ]/ k% `
if @.occupied then
6 s* v: y/ ~, p& U. A part := @.cont;
0 m' h( I5 T8 K) d/ G( t @.transpOrder := void;% H( r7 Z( R% D' d R& h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 s0 g- r- e3 w3 ?
@,root.eventcontroller.simTime);# p3 K E* G0 c5 J
@.HasOrder := false;! i# S9 }3 G8 p; u' P6 u' c
@.DrivingHome := true;( r, ]" X' ^1 D9 p" O8 _2 z
rgManager.tryToStartTransOrder;4 Z1 v" ~ z# S, P, P* Q
if @.Destination = void
, {7 x: F* u5 g: Q then -- no transport order for vehicle @+ e' J* h& I* n; T, `+ |2 P
@.Destination :=" T" D$ t' u [; g
rgManager.nearestFreeStation(@,track.~);
4 a. c! \/ J F6 l newDirection(@);
: N3 U/ y' X5 n8 N$ J% k, Q if @.Destination /= void then
9 D0 F$ S! L) }+ Z& l @.Destination.NumReservation :=; T) M6 o: L; W1 M
@.Destination.NumReservation + 1;9 p6 h( ]/ M" m% I; Q4 n; T) f
end;
. e- O2 Y) V1 o$ p: G9 C @.CurrIcon := "drivingHome";
, C; r% a) L- s) x) U @.DrivingHome := true;" g# c# J5 Y, ~
end;
$ j9 ]( M& F8 a) N% h else -- the vehicle @ is empty, both vehicle and part are in the same dock station! k( S! N( t- R2 }, V5 _; z
part := @.transpOrder;
; |- v! j+ Y- A; `5 X part.move(@);-- load part
5 Q; D& R: P# z$ p4 O6 u @.CurrIcon := "load";
1 s6 J5 U( ^% k! c% P1 Q7 L GlobalDistObj := part.globDestination;
6 K! a" ?1 K I3 l, j assignLObj := rgmanager.rgAssignL;0 ~" x6 M! P3 Z- ]
row := assignLObj.getRowNo(GlobalDistObj);
H3 v# b7 Y: j: r T1 F7 W if Row = -1 then -- since 707 a- F* N H- ]; s2 r% i
if lan=1 then# Y/ `0 J/ ]& s- ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! O# L' m) j6 p. I( t' G to_str("in der Andockstation: \"",?.~.name,"\""));& f5 D* ]/ ~/ B' [4 s" M
else
* r* {0 a9 k/ L% t3 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 w0 f& I6 K& G0 G
to_str("in docking station: \"",?.~.name,"\""));
: ?1 p( Y. s& A end;
7 U' l+ [0 N" n' Z else
+ D1 r3 V5 z& M% E4 ` `1 } @.Destination := assignLObj[1,row];
7 B/ l+ q) p x& c9 X end; 5 P5 y9 D6 r# m6 v2 c" W9 {7 T- v
newDirection(@);
+ X, g. \! N& a# H @.HasOrder := true;
2 j- ^) Z$ C2 X% f0 z& a* U end;
* X; v1 w# l9 w* p5 J' m end;
# F0 d8 ^1 ? E% s3 x2 ~end; -- of the method
3 A3 h7 X- z8 U8 G! s; r |