/* called by: entrance ctrl of the object 'track'0 }3 w- N$ O% p
*/
& q- c3 D) w$ his
3 M) W8 X/ _1 j" l, y @; t6 y H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 {' C# L- \+ s A6 e; d3 sdo
/ ? Z) p- T) g2 S8 J Lan := rootfolder.Internal.Tools.AOLlanguage;; i4 \5 |' }4 Z* \
if current = @.Destination -- else return: T4 ~0 \. T( y8 n( D1 C
then; i A. X$ g6 S; V Z8 y0 l D$ W
@.Destination := void;
6 [6 G5 p; Q$ T8 I; Q1 ]$ r+ l if @.occupied then
3 s% t, G* B* W% {! c& z) {4 R part := @.cont;9 y @" \7 ~( y* h5 _! L2 e
@.transpOrder := void;: m5 C {# P0 E. k$ o3 `5 C$ }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ d9 |4 a/ i0 X, }6 e3 X
@,root.eventcontroller.simTime);
2 U- j6 O( l9 r @.HasOrder := false;6 X% ~# Q) u5 B: p5 n2 H
@.DrivingHome := true;. L: h6 N& n5 I2 X0 _
rgManager.tryToStartTransOrder;: K* U6 G8 t* T( g0 f0 _
if @.Destination = void/ X2 K3 K- ]* Q7 l$ H
then -- no transport order for vehicle @# W9 U! l4 ]: G- T% ~6 P3 [
@.Destination :=
5 R8 I! f& S* T rgManager.nearestFreeStation(@,track.~);
# O( }$ `, a4 @4 ` newDirection(@); : S1 c1 I1 m/ S4 e0 {
if @.Destination /= void then( O* E* T) q" H: h. C
@.Destination.NumReservation :=
4 B# U9 d1 s3 ]6 Y @.Destination.NumReservation + 1;
% M: B9 N( T/ L4 X6 L( ? o6 g* Z end;" X0 k( A) e: d3 M, g
@.CurrIcon := "drivingHome";/ r: u, u- O& u& r* l' Y# f# [
@.DrivingHome := true;" S; _8 H; T+ k; h
end;8 p! `; Y5 q5 i! P& X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 g8 U6 k' U- n6 p& J$ Y+ O$ f
part := @.transpOrder;& n: I2 N: B: s& u& V
part.move(@);-- load part
* s; a) x. f; z* |& Z @.CurrIcon := "load";4 X- r* U, B7 l7 C1 {- C) c& K1 w
GlobalDistObj := part.globDestination;
& r* Z2 T8 [# h assignLObj := rgmanager.rgAssignL;* b. Z' o% k% x
row := assignLObj.getRowNo(GlobalDistObj); D: w0 l% @ n- y4 D! C
if Row = -1 then -- since 709 p8 ?, [ p" _# j! z
if lan=1 then
% |; h+ [" n! R; l4 N1 j5 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- V! U% P. c9 {2 d9 j# m l
to_str("in der Andockstation: \"",?.~.name,"\""));
3 b' Z7 E4 `/ R+ i else
- R M) E1 k/ Z5 G% O t w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 F. Y: u+ D, i6 f to_str("in docking station: \"",?.~.name,"\""));
6 T8 H1 W* c% i h0 v9 X) I v end;
% Y+ t/ G, \. r6 B6 {! } else/ y& {# Q& T7 O0 }; X
@.Destination := assignLObj[1,row];% c" N L- u& c: l2 C" g2 ~& Z& N
end;
" P' v. r1 ]8 r# }, ^% M' q newDirection(@);
! j% `8 B* d4 ? a& H( P x @.HasOrder := true;; ?0 p8 z) T! y) ?
end;
5 X8 W, z0 A; D/ } end;2 I6 B& ?9 ]' X4 s% N; @' D6 j' W' ~
end; -- of the method; F, J# p! ]0 b5 m" r
|