/* called by: entrance ctrl of the object 'track'
" O9 X& M$ D4 n! M5 _6 k# n*/& J8 {' P/ d; s6 @" S1 ?* L2 k+ k
is
/ \ I+ Y8 W4 v4 u# ^& Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 [; _1 h! T! J* C# Edo3 N" s' [% ?0 W3 A, l
Lan := rootfolder.Internal.Tools.AOLlanguage; G$ W" K0 Y, B. h5 D: p% W Z
if current = @.Destination -- else return
* i+ a2 z; L* Q7 r+ s then. b5 Q- J. h8 U1 g* x$ T
@.Destination := void;
7 F# D# G9 u+ I* I if @.occupied then
2 a3 `2 Z) C: f+ X: O; E part := @.cont;
1 v; Q: ?! \0 k' u* }* ~ @.transpOrder := void;: q6 y" ]+ i4 T& E( z6 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
G3 j0 y, p, Y( F& I& g6 C9 B @,root.eventcontroller.simTime);& o( m- S' e) W0 l8 n" g& p6 `
@.HasOrder := false;
9 `7 z' K4 U. N3 W4 t @.DrivingHome := true;
' N; ?: C5 g& S; ?$ Q rgManager.tryToStartTransOrder;) Y' [% A) s& f. n2 y2 i
if @.Destination = void
7 ?- o7 Z1 |6 U' F T2 R then -- no transport order for vehicle @/ T: Q/ }9 b7 ?- k
@.Destination :=, I0 g' B( j S/ [( f( C# C/ I8 T
rgManager.nearestFreeStation(@,track.~);
( m( v9 j& m* q, s& ^ newDirection(@); 4 ?# |/ U1 m$ H$ C8 ^6 A' A
if @.Destination /= void then
% b- k7 \9 C1 T0 m# {4 z: j( M6 ` @.Destination.NumReservation :=
: |9 z& W6 T& E6 [ @.Destination.NumReservation + 1;
" O, w4 f# e7 U3 d7 S! v end;* Z9 u1 R t4 W9 D% v. D4 }
@.CurrIcon := "drivingHome";
# y# C4 `: I: O- h @.DrivingHome := true;
! w& _! C: w p: Q1 S0 R) u end;
- Q! N+ x5 g0 s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 P9 w9 E9 H- M( H% R, H part := @.transpOrder;
/ w, ~0 t* j/ }5 v part.move(@);-- load part3 s! J) ?1 @$ G, V; W$ J2 D
@.CurrIcon := "load";
& k$ ]5 x! s6 K$ B7 z: Y% L) }, e GlobalDistObj := part.globDestination;
+ X( }! p4 a* m# O7 \- S9 S assignLObj := rgmanager.rgAssignL;( ^# g0 ?. `5 [$ a
row := assignLObj.getRowNo(GlobalDistObj);. |/ x" y! ?1 G( _# x. G( i( w
if Row = -1 then -- since 70# `3 R% u6 D" {/ @
if lan=1 then6 ~ ]& A3 i% @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 H# n/ Z* j: M3 j4 y4 g) b1 i
to_str("in der Andockstation: \"",?.~.name,"\""));
- q$ h% i2 `/ K else" F4 ]* Y4 i3 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 Z: H" ~6 E! s: J: v. s
to_str("in docking station: \"",?.~.name,"\""));
, M* V- ?+ ~( ]: g; b3 ` end;) _; r+ A" t# g* b/ T
else3 N: O# N* }* G' h( Y s% T( D z
@.Destination := assignLObj[1,row];, n+ I% w- P- W8 @
end; * j) L. ]$ w( [& I# i4 J" L
newDirection(@);% t! \4 }+ q4 O& {+ ~! u
@.HasOrder := true;9 v) T( j: \* S" ]! F! @' U4 C
end;
2 K4 j( F; v# l4 v z( O end;" x1 M2 Z0 M+ ]4 i
end; -- of the method- `8 Y) [' v4 X: t3 F& N
|