/* called by: entrance ctrl of the object 'track'
; h3 s4 y& }+ x4 }! v*/
+ U: e9 y7 Q3 o4 `is
; }& L1 e4 O5 Y. ?4 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z- G+ b# Q" B. R: H
do
* o: u- u+ g; c# @9 q' L: Y Lan := rootfolder.Internal.Tools.AOLlanguage;
# t2 Q3 p/ m. v+ R if current = @.Destination -- else return
( ~. ^2 [( C* }3 O O then
, W: z+ X3 s2 t @.Destination := void;& M+ l+ V; Y4 H4 a* j0 I
if @.occupied then( h, ~( o I( {1 ~( o
part := @.cont;
! s% ?. v2 U, g6 }1 g @.transpOrder := void;
5 W; ]; s! y6 V2 \" T+ K' \$ H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: h8 D4 S% u* b7 D4 J C) _ @,root.eventcontroller.simTime);
# s8 p% F0 F a9 s6 z; ?+ ? @.HasOrder := false;+ a0 ^! j; w( p3 p9 q( d
@.DrivingHome := true;
, Z; r0 a, A2 v4 \! g3 d: R- i rgManager.tryToStartTransOrder;; q0 M" U" R$ S; X* E0 i
if @.Destination = void* @1 z) G' w C' I9 y
then -- no transport order for vehicle @9 u' H( B. I' @+ p* W
@.Destination :=
0 c( m( R- [' A, }7 _( Y- X rgManager.nearestFreeStation(@,track.~);
5 t, t( c, C+ b. S newDirection(@);
3 F* c+ C1 |$ s if @.Destination /= void then
! k+ K8 f% [) u! n- H2 @ @.Destination.NumReservation :=7 r2 H7 M8 L2 c3 {, a1 B* A
@.Destination.NumReservation + 1;8 f1 L& P9 k% V: ~
end;* z6 b) |; D- `0 G5 Q3 Q) i( B7 Q
@.CurrIcon := "drivingHome";, q' _: H$ z& N- V0 N3 P% U
@.DrivingHome := true;
" a1 ~" d5 X4 l( X7 t4 T end;
# y5 s# ]/ \# y1 P7 V5 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 j( C1 ^2 \5 M8 g. l
part := @.transpOrder;+ g# ]* A1 o! Q1 J T8 A. b
part.move(@);-- load part
* O B& a: K& H+ o1 `9 j$ D- w @.CurrIcon := "load";' ?; s) b; x1 z1 H# i4 }! Q/ j
GlobalDistObj := part.globDestination;
' V1 p# [7 J* \: B2 C- @ assignLObj := rgmanager.rgAssignL;0 e' U, ~8 Z' s1 P8 M
row := assignLObj.getRowNo(GlobalDistObj);
/ H! `8 F, G! U+ |0 l4 R- a if Row = -1 then -- since 70: @( ]2 u* K3 ?1 K4 ^& Y- S- E
if lan=1 then
2 q! r* w2 J2 S9 {( O6 j! C! N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! E) r# [" v7 j* L to_str("in der Andockstation: \"",?.~.name,"\""));
h+ z5 y0 }6 h else
8 i* K* c& ~$ y6 q# T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), t3 B" O$ A, n* W: Q8 g7 Z/ M
to_str("in docking station: \"",?.~.name,"\""));
- l8 {# V. X& _! f* X end;
* S- x& U+ n" C" c4 I7 j. v9 | else; q9 t, C: @6 Y, s2 p
@.Destination := assignLObj[1,row];
1 ~8 R9 C) Z' z% } end; ; u" y2 L: H: l+ X4 Z# s
newDirection(@);
2 F( s% B. R8 o, W @.HasOrder := true;4 j1 v0 U9 E5 G. h8 a& _8 A
end;+ C$ e5 r, d/ i7 i2 @/ k" p% u; n. u& q
end;/ O5 ~0 L# u O# m+ `5 C, W
end; -- of the method
" i* d" t# _; J3 w2 L( J4 y0 k |