/* called by: entrance ctrl of the object 'track'1 r8 S, b" W8 @- u! {
*/- M! R; q- [1 u. R0 C' f+ K. S
is
# [" }$ B2 V; l" e. I, ^, p+ N, D part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 K$ d& a$ B; x8 p
do; }- M; k: h% ^ k8 V# q+ v
Lan := rootfolder.Internal.Tools.AOLlanguage;* L8 K7 K; z8 z8 w8 w A Y
if current = @.Destination -- else return0 M2 y: h1 {) D, a! r
then9 J7 C9 n6 c/ F5 E
@.Destination := void;
6 o m' Y/ D% R" g! l if @.occupied then
- e# ?; R9 {2 V4 L part := @.cont;) Q" E- ]% \' X
@.transpOrder := void; g3 U: I, E, l' g" ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# x0 t9 l3 q6 p6 ]2 r1 U @,root.eventcontroller.simTime);
! k- R: M0 M2 Y( K @.HasOrder := false;
1 {& [9 [* X! i+ h: Y+ r- w @.DrivingHome := true;
$ I0 D+ D5 W8 j6 i, l rgManager.tryToStartTransOrder;5 G9 Y B2 J/ W( {8 p* T _2 H
if @.Destination = void
R: O- Z; \& s( {3 B' d then -- no transport order for vehicle @
% f0 u. c- Z9 w" }* x @.Destination :=- |6 x, w4 W2 F2 V' W
rgManager.nearestFreeStation(@,track.~);& C1 ?; R6 L9 e; J
newDirection(@); 6 d7 [6 G- l8 d: A) y6 G
if @.Destination /= void then
6 ?; q5 E) n ?+ Z( ?1 ? @.Destination.NumReservation :=
* `- s9 s$ n, W, P& u8 ?0 b @.Destination.NumReservation + 1;
, n2 |* h+ F: s1 ~ end;
/ q8 ^9 `) t' v& o ^; i" `# R( o @.CurrIcon := "drivingHome";9 c4 W7 v4 c2 z! J' E' ~
@.DrivingHome := true;7 w0 f1 a, d- o5 b
end;, b+ |& T: B: p0 D/ h0 U. _. w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" _7 T; g3 u' I# K0 a; a# o
part := @.transpOrder;* d& U9 r0 a* i5 H
part.move(@);-- load part$ k7 i. [/ h0 g6 P" h
@.CurrIcon := "load";
) g2 C% D' ]- C GlobalDistObj := part.globDestination;. H8 ^' |! |: Z S' S' O0 v# Z/ A n
assignLObj := rgmanager.rgAssignL;
4 e8 {+ R- N7 `# o2 ?& ]( J row := assignLObj.getRowNo(GlobalDistObj);
4 n* Z7 i8 Y! @ if Row = -1 then -- since 70
z0 K- J5 H @0 y" a1 { if lan=1 then
) |( I# E. N4 B- |# N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ v7 a7 V2 H! j& a6 W2 H$ ?; k# ^ to_str("in der Andockstation: \"",?.~.name,"\""));
, J6 q# C. `4 v" ~5 @) a else
$ I. B! O' r% e5 ]5 f4 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 E8 u7 e- K# U, i$ h5 k }5 u to_str("in docking station: \"",?.~.name,"\""));
5 z( i) M) }& s8 a7 A end;+ B) s& b D# B! B
else8 d# Y1 D: C: w( p0 K
@.Destination := assignLObj[1,row];6 ^* j) d3 o- s& j" i; D
end;
" `: Q5 H! E9 R$ |3 i" Z newDirection(@);" Z t, ~. B5 t7 f2 ~/ f
@.HasOrder := true;
% S) A2 j' T0 D' O end;
& ^8 g' [) ]8 k6 A6 s5 v end;
1 O, b) G3 M4 |1 m+ j. S9 Q1 ?8 Nend; -- of the method, X3 U9 ] g5 ]' N
|