/* called by: entrance ctrl of the object 'track'
* X. A7 a+ Y" [/ D*/0 K$ g+ \7 N1 |2 n; G
is3 S: f$ g9 R. F$ }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
V) L k4 A# T4 j7 r: ido, k( F0 K3 I" Y7 O" J3 I( y$ P5 `
Lan := rootfolder.Internal.Tools.AOLlanguage;
; ]) c3 s2 ^8 I( b3 e; j if current = @.Destination -- else return
. n2 ^2 e( `4 k1 i5 M1 r+ j- K then
! a1 C& m2 f2 P+ C3 r @.Destination := void; t9 z5 a5 c( b5 J9 L) I
if @.occupied then
- e! a* k' g0 ^/ S; V0 X! y part := @.cont;: f! x0 q2 i: d% p
@.transpOrder := void;
8 p* L9 z* B5 W6 k, c" J; c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ]) a0 {3 ~/ d' E1 U
@,root.eventcontroller.simTime);
1 S1 Q7 S- U4 ?$ o @.HasOrder := false;
0 {$ Y5 x$ W3 z/ {3 g( Z @.DrivingHome := true;& r1 V0 u) m, L
rgManager.tryToStartTransOrder;" }' A: U# i5 I, V, W
if @.Destination = void
7 I- p5 M7 P7 x0 P. s then -- no transport order for vehicle @* D% r; w" U, E/ A
@.Destination :=- a$ [. p# M0 w P6 Y- q
rgManager.nearestFreeStation(@,track.~);1 n: e! O0 S8 I! Z' p, N
newDirection(@);
/ f0 o2 e+ H3 A5 E6 P, k" _ if @.Destination /= void then; w0 ^( T0 L! R. ]8 x
@.Destination.NumReservation :=8 ]% h, Z( e6 B; t+ {" e
@.Destination.NumReservation + 1;; c5 {; ~) u7 w" `! B; r
end;
7 O1 T! @2 D1 n& u; @ @.CurrIcon := "drivingHome";8 M5 ^; H0 i7 C: j+ ]
@.DrivingHome := true;
* [% j! o- Q/ g3 X1 b" J6 a end;
; c8 L* i* T, C+ A$ V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* `& x$ R. Z" _ part := @.transpOrder;; E" E% o* d8 n% F4 j) g
part.move(@);-- load part
" \+ D- y- _' X; l/ {' [ @.CurrIcon := "load";! ]- r- k- S" t8 ~# L+ g, D! P4 S! ]( C
GlobalDistObj := part.globDestination;9 K3 b6 u1 ]6 t7 i2 F G$ ~
assignLObj := rgmanager.rgAssignL;& D- [. e, u6 g; J' A
row := assignLObj.getRowNo(GlobalDistObj);6 o* Z) k% E- `* W9 B! {
if Row = -1 then -- since 70
2 W3 x, l! J: Z6 x if lan=1 then
: U. S, V ]) v' b5 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 [/ H4 z2 g, [6 J" d& _9 ~ to_str("in der Andockstation: \"",?.~.name,"\""));
$ I. E" T% j: E9 | f0 m. H else: Z( l. W" T8 W) U8 F1 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), k( c( q$ X3 Z/ ?
to_str("in docking station: \"",?.~.name,"\""));
$ p( d% C. M; R+ Q2 k end;
. d! A! D! N; t. d" C. \ else
1 O- y/ L0 |) L @.Destination := assignLObj[1,row];, a- M5 r, X8 y6 ]
end;
, W( P X/ ?2 c* y. u newDirection(@);
& y0 h5 ?9 W1 b- e4 g @.HasOrder := true;
( x5 G7 M* g# m& K! o end;) V9 h- ?* ^1 R2 h
end;3 w: A! r: u; o
end; -- of the method
0 M" T5 |# s, K8 x5 E: I& G |