/* called by: entrance ctrl of the object 'track'6 U% k0 X# ?7 ?, ]& ~2 V. w: b3 R
*/
, h: F3 u6 D( V2 C' m* Dis
7 `$ K0 X, \6 A' x- j% m1 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 }. I7 p" q* C; t8 j* Mdo
8 Z% [' S, w. m& U$ R( z* S+ N Lan := rootfolder.Internal.Tools.AOLlanguage;
, W* C9 t ^& a& J$ n7 A if current = @.Destination -- else return
' U0 ~4 x1 a$ I1 b then
* L# h# L) T. i @.Destination := void;
5 L# X) P9 N. T, Q& Z: @ \; G& P if @.occupied then
- t0 f5 b( y; T, g part := @.cont;
- [: t7 d; j/ Y% p7 T @.transpOrder := void;4 R7 ] d2 N8 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 F# I/ l0 j0 l& v$ j @,root.eventcontroller.simTime);$ L/ ?& N! n& m" @3 n' u
@.HasOrder := false;
7 _ B% E3 s: B+ q5 h6 T @.DrivingHome := true;8 c* Y4 U6 m$ v/ k# B! l
rgManager.tryToStartTransOrder; e5 u) O5 y1 A' W& c
if @.Destination = void$ {+ G; p6 Y8 }# J' h
then -- no transport order for vehicle @" F/ r7 }4 F% z* _' Y. r$ r/ x
@.Destination :=
2 n, h" j6 B4 i: x4 ?& ]0 i; W" T rgManager.nearestFreeStation(@,track.~);
0 O2 F- f' V8 M newDirection(@); / k9 X" X! s& q/ ~0 o. z" E. w; E
if @.Destination /= void then3 _7 @; G' I0 I: S9 a q- p! Z
@.Destination.NumReservation :=9 T+ x R2 O, O, b
@.Destination.NumReservation + 1;& @% J% |6 ^ n1 ~/ C3 T
end;
5 E; Z$ ~4 P9 [! {+ F: I ^ @.CurrIcon := "drivingHome";
+ X! H. n6 P- H, c5 ^7 a' ? @.DrivingHome := true;
% Q5 y* T0 g/ M' d' ^ end;6 ^" N# z7 C% F5 m( T1 B% S6 W" y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 i A% r/ G% v3 Z% z part := @.transpOrder;1 C+ T' R( m: O3 m4 {: f2 i4 e2 M9 s
part.move(@);-- load part% Z7 n! J h2 }6 x/ s$ s
@.CurrIcon := "load";
1 W0 K' k* a& c; u1 k GlobalDistObj := part.globDestination;' [% G; @6 j* V! O7 L* r
assignLObj := rgmanager.rgAssignL;% o' t- w9 R/ K$ v- O- B; o
row := assignLObj.getRowNo(GlobalDistObj);
O3 J* H. R; q8 ?: M, c if Row = -1 then -- since 70& R: F& z/ u7 S; c9 Y# C4 z% f
if lan=1 then# E/ b/ z3 _ x) ^( B# F6 Q% T4 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ P( y( R' e, `* n* ] f to_str("in der Andockstation: \"",?.~.name,"\""));
! C0 z: w2 l/ @ else
: E' Q7 i: J. I9 d( r( @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 R) k- |8 k$ ]6 y6 c
to_str("in docking station: \"",?.~.name,"\"")); & q4 _* g! P0 b* m! g1 I
end;6 \* x' Z+ c d; d9 U( k3 W6 _
else
# M; d1 E+ y- q3 Z( z+ Z @.Destination := assignLObj[1,row];2 o+ G1 i- }9 u; ^4 |, V8 J3 H
end; 6 G: L9 U/ `- x% s4 h9 N j
newDirection(@);3 Q) o4 Q9 a6 f" I' o
@.HasOrder := true;" O6 W# q- Z( x! e" F. f# \
end;
" `9 X4 O# ^ J; @: p: c! [- v0 { end;% F. j9 k! c; L0 h
end; -- of the method( p; b, x! w# v( y4 O* [* w
|