/* called by: entrance ctrl of the object 'track'0 ^2 c9 I' C8 [6 B) P* F8 m
*/
7 d9 \% |; ~8 \0 l: E3 h' y, qis
( ~0 S8 E* ]1 C+ _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- \+ n- I1 c6 ]" V6 t3 Kdo
, T; A- Y4 d9 j6 U Lan := rootfolder.Internal.Tools.AOLlanguage;
' |% \5 ], [5 g if current = @.Destination -- else return# U' o; G3 S7 a# p* P! E
then
& g8 w+ s* ^0 p$ b# G7 q' n @.Destination := void;7 i4 J/ x' \! ?) _5 D2 Q
if @.occupied then# h) _# i7 k4 d! Y" e2 f0 Z
part := @.cont;
' q% g8 n- o2 ~/ Z7 N- S @.transpOrder := void;' V$ e9 t0 p) ~$ ]+ Y( {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 X, i1 o$ C4 E/ B @,root.eventcontroller.simTime);; `; a6 K$ {. X6 Q5 ^' j% a
@.HasOrder := false;
0 [* K: S2 X/ K2 b( ^: M& } @.DrivingHome := true;, @8 G) c# H* M
rgManager.tryToStartTransOrder;
6 j" o" K1 j. h- K) }6 @ if @.Destination = void, d$ `& R, Z e- i
then -- no transport order for vehicle @
0 U- H5 y- M" ]! M5 l3 l" F @.Destination :=
% I1 B0 @! {$ B rgManager.nearestFreeStation(@,track.~);
2 x% z. g( Y' B) U newDirection(@);
1 E( r |6 \6 Q- X- c, A5 I if @.Destination /= void then( e* Z/ x! d+ R
@.Destination.NumReservation :=
) N. i6 a! h, r& s @.Destination.NumReservation + 1;
% B- |1 h& |! \- j @% m) l end;
" L5 q, N6 m- m i1 v- M, K: W @.CurrIcon := "drivingHome";) Z% y6 I; G2 D
@.DrivingHome := true;
& N9 J5 F$ ]- w" ~+ N end;( P1 t. N/ M5 N! S6 d8 J5 B- ~. t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ I. v6 z$ {5 _ part := @.transpOrder;
" @- ^6 t7 d1 [4 M: T/ C3 K$ o part.move(@);-- load part7 ]% w7 N! \6 ]% q& D# Y
@.CurrIcon := "load";
7 I; R/ a" [( T7 b6 p8 a, p' R$ A GlobalDistObj := part.globDestination;0 O5 U! i* t9 ], ~; y5 }0 E) ~3 v
assignLObj := rgmanager.rgAssignL;
) f+ n, L8 @0 K! K/ h row := assignLObj.getRowNo(GlobalDistObj);
4 d- m$ f% t5 M j: R( V, W# G if Row = -1 then -- since 70
[4 S: a% V1 H( \) `' a) _( ]: W if lan=1 then
& d) C9 B; `: J; m1 P' ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) }* p6 j: R P9 |, C, O to_str("in der Andockstation: \"",?.~.name,"\""));$ }6 N; {4 b9 C# b- @( |+ @
else
' e" c O" e* j8 ~2 Z2 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 z8 Z# Y" a* q2 a to_str("in docking station: \"",?.~.name,"\"")); # |; ?# g1 m) I# | `5 i, Y4 I
end;# W8 f; x% J. ~6 p5 q
else
% b3 o9 P7 E7 ~" z @.Destination := assignLObj[1,row];
1 u5 e0 r# ?5 s; @+ m end; , w, O6 G/ n6 D% k0 p0 B
newDirection(@);
/ w' S2 O/ J# x1 f- A, T$ n" b @.HasOrder := true;9 G; g' \) f* P, \& ^
end;
4 P3 Q' j2 ]# Y" G+ }3 \6 v7 E end;
+ B/ @0 s9 x6 }2 P+ F$ X; send; -- of the method* v5 |, r" t# f( c4 s
|