/* called by: entrance ctrl of the object 'track'' C6 [. c( t1 K0 V
*/) E0 d3 p! Z' k2 F( l$ l8 I! Y# o
is
# r, z. w, {, j" j* g0 ]0 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 s. }2 ^/ D" R [' \# ado+ x& P0 R8 f" _$ x$ t& k
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 m7 b* X! d. F, l& F if current = @.Destination -- else return
" l/ u$ ^6 _- T( r then/ Q v$ \6 z w" T
@.Destination := void;# F1 Y$ Z* W' \2 D+ `
if @.occupied then
/ i! c3 y4 ?( F5 I" l& w: \) I5 _' F part := @.cont;- A2 K* |$ m1 w, b4 S
@.transpOrder := void;- c1 p8 Q6 f2 b% I8 p0 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 X7 w$ ^8 R6 R$ Z: H. ` @,root.eventcontroller.simTime);
) h( e- V$ D( T- Y4 Y @.HasOrder := false;
% d8 ] s1 \4 L+ v @.DrivingHome := true;
% \6 k2 H1 H# \' J( ^ rgManager.tryToStartTransOrder;
" [; n5 B1 k, O7 ?% b5 Z w if @.Destination = void# Z7 u& W" z3 n9 G
then -- no transport order for vehicle @
2 r( d; j1 F+ C4 g& I S) z @.Destination :=8 B; O4 }9 s. K* R
rgManager.nearestFreeStation(@,track.~);& Q" n( |- w! q9 E
newDirection(@);
: P) p& J4 j" e t: w9 h if @.Destination /= void then0 I0 K* C; ^) o; d& Y( Y$ T' G$ o
@.Destination.NumReservation :=' C" n9 p, G: T" D% J
@.Destination.NumReservation + 1;& x0 p; z& J! a5 g5 ^ I
end;! q( p9 N |- Z3 ^
@.CurrIcon := "drivingHome";! U3 v3 `* \. g8 t
@.DrivingHome := true;
5 g* K& @/ |) p: b4 G$ V u- G. q end;
4 {" v) V6 S$ Q" _$ ]& V( D. H* Q- b else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 m6 y8 ^+ z1 n# J( B
part := @.transpOrder;
) r5 c' [0 q0 s4 |$ i part.move(@);-- load part
4 J9 @5 S% t5 r5 b N# P @.CurrIcon := "load";
9 U& q+ A1 X* W8 J' n2 w& c GlobalDistObj := part.globDestination;; t' \) v9 l& d5 ?+ M, c' }
assignLObj := rgmanager.rgAssignL;" M- B5 d! X7 _( y& G% D$ d4 h" H& }, c
row := assignLObj.getRowNo(GlobalDistObj);# y( [+ Y7 c% f) M, i# D3 u
if Row = -1 then -- since 70
$ T4 c$ b$ q4 p% m' b; | if lan=1 then1 a" `4 h' e! [- k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 F9 @3 s. \) ?4 X to_str("in der Andockstation: \"",?.~.name,"\""));
# {. G. L; f6 p3 g6 F4 V( T else
7 {! q, v9 ]7 u& s+ {& S4 }% p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ u) \ j# S% s9 r
to_str("in docking station: \"",?.~.name,"\"")); $ _. n5 `/ e# N! A
end;
$ L+ ]9 ?6 L( T& y) q( l3 S else6 T) V) q6 t1 y! f+ b' Z3 A6 Y
@.Destination := assignLObj[1,row];
2 B: r* P3 Q1 F2 X1 Z end; & |1 n, d Q# v; K& f
newDirection(@);9 Q6 f+ n* P6 K- P+ y4 V" q0 f& l t
@.HasOrder := true;0 c0 V9 |5 o) P# x3 m6 B
end;5 P" b3 G9 F- s6 c0 j
end;
; O! P7 c) d! A! I% |" oend; -- of the method
' B: W, q: H) ~ |