/* called by: entrance ctrl of the object 'track'
+ w( W$ K7 I! l; }6 p! J* A9 J*/
8 |7 A+ c' v% u& ]; ]. |& \- nis
. U5 U- Z7 D/ P# ~$ Q" v8 V; B part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 ~# v8 _! |, d+ ~2 \2 S7 W2 ]
do9 X3 {1 C/ `& o* O5 z1 c8 Q' M* v
Lan := rootfolder.Internal.Tools.AOLlanguage;" f& L4 Q% u1 b5 n
if current = @.Destination -- else return
$ P1 t- u6 \' \ K& f then
% F" V$ U$ w3 H% k, U( H8 i @.Destination := void;
" m) b1 X! K+ C0 H1 A; c* U if @.occupied then/ A2 d+ Z' W' `
part := @.cont;- u, z0 t8 m! }* V) H Z. b. W
@.transpOrder := void;
# P3 y; s) j1 C; P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& z% s- X) Y- [. }# }( M0 Z1 b
@,root.eventcontroller.simTime);
6 @! Z0 T5 }" t- g' ~ @.HasOrder := false;: D2 r) n1 t) [* r
@.DrivingHome := true;0 B2 H7 F7 W! _9 r3 k! Z
rgManager.tryToStartTransOrder;2 [% G7 p, u k
if @.Destination = void
# ^7 _& V& n+ y, w3 X then -- no transport order for vehicle @2 _3 ?- t" e" w; L# C
@.Destination :=
: G* M' m7 I! ~% V9 R rgManager.nearestFreeStation(@,track.~);
}1 Z% G+ E/ b- p1 O8 X# E; C newDirection(@); 9 ~3 g- F6 H# H2 l8 W
if @.Destination /= void then
1 |9 I8 m# \& W8 P7 ~9 x4 V5 I @.Destination.NumReservation :=4 }3 e) T" l2 m
@.Destination.NumReservation + 1;
2 P6 {: l* M7 I% P B" Y end;: |6 B r0 Y/ l7 N/ Z
@.CurrIcon := "drivingHome";' {7 X" G K0 m) [' l7 D
@.DrivingHome := true;
! a/ ]. j {) [ _ end;- K4 o) c' j6 s; n" a1 z" Y- q. ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ r0 U2 f+ s: b8 S5 r
part := @.transpOrder;
* F6 q' q1 V- m$ ?1 O, ^ part.move(@);-- load part
/ }1 C0 m; F ]' R2 U @.CurrIcon := "load";
1 A% R- F2 @. N( O- [ t; r GlobalDistObj := part.globDestination;9 R+ g- ]" f( I0 F( c, a
assignLObj := rgmanager.rgAssignL;. [) }5 ^3 @' J
row := assignLObj.getRowNo(GlobalDistObj);
& U8 w2 ]& s" P( w) Z7 p if Row = -1 then -- since 70
8 Z3 M6 l# ?* b, t5 Z; V0 H$ Y' f if lan=1 then+ g3 H1 N+ K2 Y3 t; f* K7 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( x4 i& r# N: G* C( W4 ]1 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
r( X- [6 |% V# R: } else
) P( I6 u; ?4 s) a( n# |, q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. [8 G- `+ M1 q to_str("in docking station: \"",?.~.name,"\""));
& ]- d6 [' k1 h0 ] end;+ T K9 G/ D: p) Y5 k1 F8 Y1 z6 x6 n
else
# C5 L7 \* S: C, R, ^4 N% f3 } @.Destination := assignLObj[1,row];+ M8 W* u C3 D6 b
end;
# P- G2 E$ O8 s* K2 D newDirection(@);$ O7 b- i) B2 V/ t. q( M1 ?" x6 g8 x7 |
@.HasOrder := true;
% k* e$ t2 c l% {! M6 g5 V end;
' T7 `8 X$ l+ b" P7 F end; v$ I9 C2 T- H5 j+ }; w
end; -- of the method! T( @* F, j, d8 _; k
|