/* called by: entrance ctrl of the object 'track'
+ t, r4 \' {+ x) i/ m1 I* S*/. J' c* j0 ~0 z0 } C O/ A7 f% l
is1 z$ H+ d0 X5 {, {( ^' K% x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 H% _- B, Z {; I& C+ D/ ]
do
5 g0 @5 K7 L, U+ q$ } Lan := rootfolder.Internal.Tools.AOLlanguage;
9 d) `) a. R6 F2 |* E if current = @.Destination -- else return
* H' f7 A9 m* F& E0 B4 c& l: H then
+ M- ~! L, F' r, w/ [ @.Destination := void;
A1 m7 _% H7 o8 \9 l if @.occupied then; O% ^. q# k+ C J: ~% h+ j
part := @.cont;
- N# [) @8 i& H3 R' i, u @.transpOrder := void;: ]# R; o/ d1 m: J5 k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: A2 O# a4 v; c% s$ K' }
@,root.eventcontroller.simTime);
3 q# {, q' G9 K" A9 L4 _! S4 o3 | @.HasOrder := false;* t* o' Z; K4 J" p O3 h5 m
@.DrivingHome := true;
* N7 y8 E2 J/ V1 N6 x4 Z- ^ rgManager.tryToStartTransOrder;
; G9 f4 }2 Y5 ?" A+ y& B if @.Destination = void) B9 C+ S% e6 e! L. ^, b: |3 J; Q
then -- no transport order for vehicle @
5 ]# w" v3 Z# o( a3 l. u @.Destination :=
( x0 y; h7 y5 _* ]* g8 D, h7 Z! d w rgManager.nearestFreeStation(@,track.~);
4 i) t4 l; Z6 {. B4 p- F newDirection(@); 2 x; m( I. x3 f0 A
if @.Destination /= void then* G# Y9 Q' f: l z, s
@.Destination.NumReservation :=0 {3 u3 ?" ?7 ?
@.Destination.NumReservation + 1;+ p$ L; F7 |8 E/ J. U* N
end;
. w" g* @# n4 r1 ^+ \1 o$ L" Q$ } @.CurrIcon := "drivingHome";
}0 D' U& e% k- o+ y- t8 H @.DrivingHome := true;1 w' h, r2 S& w) o7 _
end;: e w9 w5 j! }8 J) Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 n Y- ~( r5 b& Q- C8 D' H' Q part := @.transpOrder;
; i# F2 I+ ?8 Y/ M part.move(@);-- load part
. a; g2 g% @; A/ T" w0 Q" N. K5 t) f/ U* ? @.CurrIcon := "load";
P) g5 E3 Z: x: ~2 Q GlobalDistObj := part.globDestination;
) Z* ?# f3 k4 J( y- a2 r/ M% i assignLObj := rgmanager.rgAssignL;, w7 L1 S+ Q( B
row := assignLObj.getRowNo(GlobalDistObj);* b5 [# P7 x/ m0 ]
if Row = -1 then -- since 70
) Y- p! w& C, |/ e( q" o3 M if lan=1 then) F6 R8 J8 |9 A# R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- k- H* Y( S1 F# q2 D, Y8 r& U
to_str("in der Andockstation: \"",?.~.name,"\""));
9 R. B' {: r; L! @/ ?" R else
) x' A( }5 o& j& K1 s. o( l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, ?8 C( W8 [( O$ v. c" P to_str("in docking station: \"",?.~.name,"\"")); % R( J; j/ q) k1 g
end;" W5 B' ~+ g7 H2 ? S! _: i
else
, h, P# r9 S( C \9 a* Z& l @.Destination := assignLObj[1,row];
X1 q& N, J: q7 i end;
( \8 p( g8 A4 |0 |5 J newDirection(@);
: p0 t. K) O+ P% A+ z% A( Q0 s @.HasOrder := true;- c# o$ n8 I$ E# u' f& P# H5 s! x
end;% v% j4 n7 ?) B% r% T* _- C
end;
" k. M! V% w# h2 }' fend; -- of the method, V& ]+ k- |9 o. _' C
|