/* called by: entrance ctrl of the object 'track'6 ^7 M, T, P% x5 ]( Z4 D
*/, i- ?' s; D8 R% ^
is
7 D0 g! {, T( y8 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( v2 t B7 Y6 m x% Sdo
3 k, ~" {9 c' ^2 }! @9 w Lan := rootfolder.Internal.Tools.AOLlanguage;, j( k0 Z8 f# a- z
if current = @.Destination -- else return" Z8 S# M) z1 Z
then, _" ^* A9 T2 x, A
@.Destination := void;( d$ L( ~4 |9 n/ D* a, T* J+ ^" ]
if @.occupied then
$ }+ E4 }/ O3 G" s w1 I+ ~5 [: g9 C# @ part := @.cont;
) }; B1 {6 n3 \2 @ @.transpOrder := void;
2 f2 ^" ` h7 V+ d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 k+ ~& ~9 e0 q, _" c9 P: x" a
@,root.eventcontroller.simTime);
3 N: W2 _# f7 j g7 S: Z @.HasOrder := false;
! I: {* R2 O- Y( G @.DrivingHome := true;
' p4 }8 U, g7 R8 ]1 [5 e' a rgManager.tryToStartTransOrder;- R% G% M" ~3 a) p
if @.Destination = void
2 d q+ u. W. P; }6 v: \* K* v then -- no transport order for vehicle @+ ~( T U8 D0 T- e
@.Destination :=/ n: i0 n) j |$ p% u, p0 M. H
rgManager.nearestFreeStation(@,track.~);2 b' N) N w. z/ S
newDirection(@); : l0 A- b8 o2 O& o7 Z
if @.Destination /= void then" U& ` H* l9 T( e
@.Destination.NumReservation :=8 l5 p: \! S' Z# Q$ m; z
@.Destination.NumReservation + 1;
: X8 h" s( L+ B4 L end;
! N( @. `, @, W v% j @.CurrIcon := "drivingHome";. @+ s `* W% m% o( a
@.DrivingHome := true;9 A0 H6 r! W$ j9 _' R
end;+ E$ |5 F) Q& M$ o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 }) @4 v5 c# ^( H0 B: Y part := @.transpOrder;
9 d* o& [1 C$ H: { part.move(@);-- load part
o( q* j0 w w x: v0 x" B @.CurrIcon := "load";
* i( Z6 y, K6 V! _ GlobalDistObj := part.globDestination;
# A# C: k$ k/ J, k4 `2 F assignLObj := rgmanager.rgAssignL;
$ n2 `; m9 g+ w) i/ j2 x9 C row := assignLObj.getRowNo(GlobalDistObj);. q8 z! |/ M5 r4 G
if Row = -1 then -- since 702 W8 i; j$ u& _- o2 \
if lan=1 then% F5 R# n/ j' v' Q! r V9 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 e2 k# q$ U$ Y4 p& u to_str("in der Andockstation: \"",?.~.name,"\""));
" W+ m7 H2 D& c9 e- y else0 }4 Q' G9 f9 _# V9 i8 |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 [- ^5 a) b. ^6 v
to_str("in docking station: \"",?.~.name,"\""));
- X% I3 F; k# l, |* ~ end;
6 U f9 n( X; \8 ]6 D/ _ else
a. ~& i) Y$ U# N! A! m1 d- K @.Destination := assignLObj[1,row];) p9 l9 T. ^6 z' X+ [9 n* Q
end; 0 d5 a- @# a y8 V4 C& p/ o
newDirection(@);
! G, t& F4 h6 f; I @.HasOrder := true;: C& P/ o% ]4 N0 J4 ]: T
end;
1 E3 j3 @3 b' ^) S end;
; W8 }! M# p8 A$ z5 tend; -- of the method
; x. M: A |0 H# W1 _# n4 y |