/* called by: entrance ctrl of the object 'track'* ?% y" r! R0 ~$ ~$ |) r6 A
*/
% F) q/ q' @/ X" U, h3 l# P: n* eis. ?$ F: f# w0 ?4 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 {( L: m( {7 H$ E' Q8 m Hdo* l2 s) _% |" u" ?# ]: T
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 a- y6 Q% x% F# p$ ~1 _1 @! V if current = @.Destination -- else return- x+ K) e9 ] _0 P( c6 v( D2 @0 C. }5 x
then( ~4 H6 Z+ f, {. m/ f
@.Destination := void;
' \) U+ S& M: {! X+ ~) N9 f if @.occupied then8 Z" Z6 A! G) p2 ~, B& O: W3 S% X
part := @.cont;
. h2 ?( r( r- V9 Z. P3 G6 A @.transpOrder := void;
$ ^/ q/ ]* v& Q3 Q) O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ t1 d {; K1 p2 D, G' w
@,root.eventcontroller.simTime);
( i' f o. [7 F/ C0 b @.HasOrder := false;
7 h. [4 _+ Q+ j4 c" } @.DrivingHome := true;
9 s8 ?' B( ?1 c6 A5 I8 | rgManager.tryToStartTransOrder;
2 T: v7 K6 v4 j if @.Destination = void
* i6 S8 y, B/ l9 p( C then -- no transport order for vehicle @3 r7 I( y% ~: U
@.Destination :=- j: b$ J: y" G1 L T5 d l( e2 ^
rgManager.nearestFreeStation(@,track.~);, e* |2 J @/ h9 o2 T1 u9 D: r
newDirection(@); " S) H4 W! E. J: T j/ F6 g Y
if @.Destination /= void then
6 l4 K5 P2 N, U# g( {* j4 X* w @.Destination.NumReservation :=, B& s: V B) @. D7 y
@.Destination.NumReservation + 1;
- Q8 r! {1 r+ Z, r% S end;
. l' i f D& y P, S# t) d @.CurrIcon := "drivingHome";$ o8 T9 h' y% V& H! {
@.DrivingHome := true;+ p) U1 e1 K0 y) H
end;
& n) J E3 B. i! j4 h. Q8 D! @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station) Q2 H, G3 h) e7 h* W4 U/ O
part := @.transpOrder;
5 Z) Q. |# u. i0 c k part.move(@);-- load part
+ X0 v3 h! s) a; X/ k9 R9 m9 T( \ @.CurrIcon := "load";2 |$ a1 ^5 {* _) q; _4 o
GlobalDistObj := part.globDestination;) t. x' C0 P7 Q! F9 \
assignLObj := rgmanager.rgAssignL;
/ a; \6 o/ r9 i P. o row := assignLObj.getRowNo(GlobalDistObj);
8 P9 h* }1 M8 @" t% f$ f! c! f4 j if Row = -1 then -- since 70" u+ `3 u- }2 C9 A4 x7 I6 N
if lan=1 then& F+ D& Z! K0 ?1 ?2 b. J/ g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 y& r/ j0 i& B$ z* D5 {, U8 V to_str("in der Andockstation: \"",?.~.name,"\""));) Y# o3 ]5 s, Z0 P2 p1 b
else
. j$ J, a9 w/ x9 Z$ _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* ], K7 n& V$ m+ v3 R4 y* P% M& g to_str("in docking station: \"",?.~.name,"\"")); * q" y0 x9 V0 Q% ^4 s
end;
* w& H; `" l& C6 K/ G R& X( X else. _/ G$ P4 a) I o
@.Destination := assignLObj[1,row];
8 P( I! v% }2 Y( `/ F$ c end;
: T) Z+ J# W7 J8 T5 D1 G* T* J- I newDirection(@);+ d7 D8 Q! F+ Q4 o
@.HasOrder := true;
* T5 j O8 [& h) @2 W7 ` end;
7 A; Y% T8 V2 ~" C# w8 _" P end;
+ h2 y3 x/ o9 U7 O# k& ]end; -- of the method
2 b( O: i4 I6 j$ l8 y |