/* called by: entrance ctrl of the object 'track'
+ Y7 W8 s/ A* |$ V2 j M( K*/& {9 D5 {4 e9 o7 {5 p, z3 b$ l5 [
is
; W a v( k- D8 z) } part, GlobalDistObj, assignLObj:object;row,Lan:integer;: s, U! _" ]& K0 Z7 u
do
* m! C+ K9 ?, M. [6 d, y0 W Lan := rootfolder.Internal.Tools.AOLlanguage;
* ^! H4 E+ z6 V, ~( C5 [: z1 E& x if current = @.Destination -- else return
0 N4 ^+ n" J8 c/ I9 F, V1 K then0 u% u- H+ d) c' [2 R
@.Destination := void;
2 o/ ^ j3 M" Z) D if @.occupied then) \. p! L& A9 x }: @9 p
part := @.cont;
8 j S, X% y5 P* R& { @.transpOrder := void;& d# t% y: ^" Z1 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- }6 c- b s7 E( w( p8 \& `! b
@,root.eventcontroller.simTime);. @ p; E, i/ P- L, J' V% A$ b
@.HasOrder := false;1 }$ I! ^9 x- D2 N+ J+ N
@.DrivingHome := true;: s) a/ z2 ]+ |" V
rgManager.tryToStartTransOrder;
; i G6 n' f8 D! Y2 Z6 m; [$ V+ r: N! J if @.Destination = void
' S* A. Z1 e8 B) E" v then -- no transport order for vehicle @
9 a$ Z& v6 T7 q6 @ @.Destination :=
: s. a3 w4 S6 @6 i! \ rgManager.nearestFreeStation(@,track.~);6 J5 |7 |6 j8 p% @
newDirection(@); 7 i% V4 M, a/ r1 P
if @.Destination /= void then
$ a0 X. I% v& ?) U$ Q# x @.Destination.NumReservation :=
+ z r: o" G# S3 x7 h6 k7 V @.Destination.NumReservation + 1;& a, L, x* w8 y4 V6 h* d
end;; e# D- k6 }! {" |& h& d+ i
@.CurrIcon := "drivingHome";
" g6 z$ _# R+ _4 r( c @.DrivingHome := true;
5 @/ }! f8 p" C* [ end;6 M0 E2 O5 b7 l* R5 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 X; B: C; W3 M& w) P; k part := @.transpOrder;
, p: L! W6 z6 B! E: }8 o0 Y2 x, _" a* a part.move(@);-- load part
' \5 o& c6 m: o0 q) o6 R+ a7 e; F @.CurrIcon := "load";
1 o2 g/ L- |8 {% C0 w! m, A# Y$ z$ L' [- x GlobalDistObj := part.globDestination;
- V- Q; g$ t, F: S! G7 i" | assignLObj := rgmanager.rgAssignL;. e) u9 N# e) P; ~: a9 i
row := assignLObj.getRowNo(GlobalDistObj);" f# y# |( W$ v# C
if Row = -1 then -- since 70
4 i+ ]$ w9 l- y! Q7 r/ h if lan=1 then1 o5 ^6 D. |( g- s; D. ?! l, z2 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
w; j' H6 j0 P. R2 {* _ to_str("in der Andockstation: \"",?.~.name,"\""));) V* ?2 j7 d2 `) D( l/ G
else
6 t- h- R5 p1 v: F- I7 m. |, @# T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! p$ B! T B( X& y to_str("in docking station: \"",?.~.name,"\""));
- T# b7 z* Y ]. w end;/ R% K$ f* x1 n) R; T, M
else
$ g0 J+ N% u" v& u0 | @.Destination := assignLObj[1,row];% m2 ?( ~0 V" i* D$ `3 H
end;
. {/ `: v: w G0 L newDirection(@);# V' O! B' B/ l/ a
@.HasOrder := true;( x# y, v1 ?5 ?0 K% u1 p
end;
9 V' Z( p$ y& S8 } end;
$ ^- v7 {% [/ ^3 N1 e* q6 @* @end; -- of the method$ l( _7 I n+ X, Z7 B; D
|