/* called by: entrance ctrl of the object 'track'' s( O" [# p' a* ^( t
*/( o+ V- x4 w( }1 {9 [& \# W; }
is
. z1 ^' j; W- }$ ^& t, R part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 m1 X! e: n5 K9 m$ t7 l
do( ^ P5 v: \! G3 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
- ^5 [" |- e! y0 d7 p: x' k2 y if current = @.Destination -- else return/ I7 D, K' J0 ~+ D) C
then7 E* l1 A' ]. i7 }, A t
@.Destination := void;; `0 c$ W* Q# W7 h% _5 w1 e
if @.occupied then# o' j. f$ h9 f1 d# S/ _; {
part := @.cont;2 ]1 t% f' O; N! B( D$ k6 N
@.transpOrder := void;
# |* {" Z5 m+ M- r* b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 B2 v! {( \7 V" p1 G4 D# a5 D5 s7 ? @,root.eventcontroller.simTime);
: i1 |$ [1 @) }$ }. u$ i8 B2 E: K @.HasOrder := false;9 V' W& k2 H! K4 t0 f
@.DrivingHome := true;
1 l: i' y& b; x( Y( q4 ~( H rgManager.tryToStartTransOrder;, |5 H" M# W, n& I/ @
if @.Destination = void
. H0 T, S& u/ E3 D4 D then -- no transport order for vehicle @
. T4 U* _, m) [6 r5 ~; X @.Destination :=1 k. I# B: H+ E4 J
rgManager.nearestFreeStation(@,track.~);
1 C8 m7 u( t! p" [! S! ^+ k" L: ^ newDirection(@); + q' t/ g4 A: B; a9 Z6 G3 J
if @.Destination /= void then
# e/ }5 `6 S* I1 g) T! ^ @.Destination.NumReservation :=
+ | I$ l7 |& B2 v: ? @.Destination.NumReservation + 1;
) p) u" V3 e/ k9 z$ Q! A end;
. X* K/ I4 R2 }$ c @.CurrIcon := "drivingHome";, P: y% r# Z: @/ v% P
@.DrivingHome := true;7 c- a2 ^! T4 s( B& y) y! o$ {
end;" k( m& T, `6 R5 l0 d9 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 r/ u1 m0 y# q( v part := @.transpOrder; r8 d6 A* }# K4 A9 x
part.move(@);-- load part
\( |7 f8 \4 _) y; l; S @.CurrIcon := "load";' @: p2 U2 {# s- L) @
GlobalDistObj := part.globDestination;
7 i- r% M! s& B, @+ `2 f assignLObj := rgmanager.rgAssignL;
) f( `' |* r7 a+ |- N row := assignLObj.getRowNo(GlobalDistObj);
* j9 E- x' M# U) Z* @ if Row = -1 then -- since 70- b4 h( {2 r- ~+ J) o/ O! U2 s
if lan=1 then$ E' T, ?2 w; z: C7 I, Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ u0 ^* z' f' e6 j' [" \4 j
to_str("in der Andockstation: \"",?.~.name,"\""));' K; W- ~, S( G- h
else [: A. {( M- _% z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Q; n9 O" Z* U N: P8 K
to_str("in docking station: \"",?.~.name,"\"")); 2 H' i" |5 e1 g9 p# @5 W2 c& i& o
end;4 l: B5 p4 W, Q# {
else
+ Z, t8 K. F1 y, _! ` @.Destination := assignLObj[1,row];3 q/ y+ b9 ~1 c; o6 {4 S) i. K
end; 6 m8 c& ]9 ~, v! R
newDirection(@);
s' H1 B; Z$ l2 x( h+ `2 ?% _ @.HasOrder := true;) a& \' B* k3 Y. y* O; Z* O
end;# S; |$ ~/ H' L1 c4 h& n N: ?' `
end;
: s W" @1 H3 d2 l( A2 Fend; -- of the method
& s" ` g( x$ @1 P7 y$ p- [ |