/* called by: entrance ctrl of the object 'track'
0 x% u* M: c6 c6 m*/
; z, b1 L( R- s% H2 T* Nis/ W7 C/ N- ^) A( I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' o; ?! w2 }" r, F$ h) R0 [4 K
do
' |! ]. [. G' E Lan := rootfolder.Internal.Tools.AOLlanguage;: \" _( N3 I( p6 w) [+ I2 M# p
if current = @.Destination -- else return% g I( J! O5 T# a# o- ], P- T
then, i3 z7 [$ G3 Z6 @. K9 P
@.Destination := void;
1 S( ^: p/ |: S if @.occupied then5 x! D8 p' V2 m* a" u; M
part := @.cont;' ?/ `, r% Y0 \- U j. b
@.transpOrder := void;9 O* u% s4 C$ r9 R8 L0 t- }2 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ g. Y0 A4 j5 C) ]- N0 c9 B& h6 z @,root.eventcontroller.simTime);
. I5 j1 M5 j( t% a- B. C0 [ @.HasOrder := false;
* I/ Q! O+ w- }6 R5 V2 w @.DrivingHome := true;
# l& |% W, E3 a* \, x rgManager.tryToStartTransOrder;
7 K3 @2 i! J7 r5 @! V; y if @.Destination = void
3 k$ ]+ [3 f) [- W+ `* W3 @" b then -- no transport order for vehicle @/ B4 ~* Y4 f) s, w5 F9 v
@.Destination :=% u0 J* n0 m' q/ x# X! i
rgManager.nearestFreeStation(@,track.~);- u$ O# E+ [1 b+ q6 o
newDirection(@);
* P. q ?7 c" i if @.Destination /= void then
0 H6 k1 F4 x( ]: S4 Y @.Destination.NumReservation :=
& r: J6 F! f6 ?' E; B% a @.Destination.NumReservation + 1;5 b1 R# ~( t7 W! ~( p
end;
' s) ~" h% Q% V1 P4 q2 e @.CurrIcon := "drivingHome";
$ d; [6 m1 `, ?0 t @.DrivingHome := true;4 U: J! q& h) {4 }
end;# Y# l! K/ g4 h& V6 S/ z4 h4 g8 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- C' t$ h- Y& L5 \( R part := @.transpOrder;) x: \% B7 T! W# S$ ^# v3 @
part.move(@);-- load part: Q. }1 c p" n& H9 ?
@.CurrIcon := "load";% K7 {% k2 ]$ ]/ X. I2 P( ]
GlobalDistObj := part.globDestination;/ h0 L2 L$ s' T
assignLObj := rgmanager.rgAssignL;% {' d% [$ r, Q7 O* E0 _5 N
row := assignLObj.getRowNo(GlobalDistObj);
- ]/ h7 [* V( p0 [* Z if Row = -1 then -- since 703 u. M. R0 B8 T R
if lan=1 then
% S" }- Z( c @2 g* z1 m- x& ^$ r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
g6 M( Y/ C) c7 R& i to_str("in der Andockstation: \"",?.~.name,"\""));
3 H1 A1 r) g1 t else
5 l" N* T7 k. z0 y' f ?6 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 l# a* L. E) s to_str("in docking station: \"",?.~.name,"\""));
: }) y4 @" T% }( c: ]5 R1 q end;
J/ V9 g; c8 _3 Q+ l+ n# }0 L else
, ]& o/ N, p1 L& D7 u @.Destination := assignLObj[1,row];
0 d" Z2 S* p6 i3 s [2 C" z# B end; % R9 g$ I( Q' L& \; ^; Y
newDirection(@);) K5 j4 X" P( c3 k' Y- K' K0 ]* F
@.HasOrder := true;( K1 ` w, E6 ^. H# `$ J# O0 d
end;4 b! f; x2 l# [# X& S2 b! ]4 a5 L
end;
K* K; o' r7 _2 k1 |6 o4 z' p) pend; -- of the method+ Q; p! J- k8 o4 P
|