/* called by: entrance ctrl of the object 'track'* u5 }+ Q( w, J) F3 p( m1 P9 U
*/
' G0 P" A( W" s# c9 mis1 [8 p- m9 }! I$ ?$ H/ O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% C% [+ ~0 R) [$ G: Cdo: `: ]1 B, }$ t, b) E$ `
Lan := rootfolder.Internal.Tools.AOLlanguage;
" [/ b9 D) r- f if current = @.Destination -- else return
! r: x& o. `( n ~% W( W5 `! Z. G then) [3 {+ X4 b! i6 [+ J$ R, d( G
@.Destination := void;
/ S5 g( g: F V# z$ A if @.occupied then
% I# j) ~: w: H7 w+ u( h part := @.cont;# a/ n4 ]# V8 A$ l1 \
@.transpOrder := void;+ `, v. p1 f, D* |& y* q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ p; }* D9 P9 c. u3 R$ z
@,root.eventcontroller.simTime);
7 j2 }. k; s( D2 E0 G* ? @.HasOrder := false;1 [& G3 ~' m9 ?2 }2 c( Z# g
@.DrivingHome := true;
1 z3 o6 M7 w z( o5 f) A rgManager.tryToStartTransOrder;; E ^, f( h b) k4 d7 s/ N0 [, C
if @.Destination = void
9 y- Y$ j6 m/ y3 m" g then -- no transport order for vehicle @7 A3 D3 {( ?" U; d5 P
@.Destination :=; I" j& q+ c) J; d# f$ }* E3 l& l
rgManager.nearestFreeStation(@,track.~);
* M4 I7 I" o- j' G6 @: ]6 [ newDirection(@); 7 {# H e; V0 I
if @.Destination /= void then
8 j8 |& z% N& ], Z' w @.Destination.NumReservation :=7 }" ^) I z; @' a" a
@.Destination.NumReservation + 1;2 M4 L# O' K9 K3 {5 w
end;
+ F i, A6 C% d* c# ` f! ? @.CurrIcon := "drivingHome";
$ }" ~" V: Y6 a5 n6 [7 v @.DrivingHome := true;: u6 {+ h2 F" n/ _
end;( i, o; i: D' W6 ^/ Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 U# i! U+ B9 G& t# d; V part := @.transpOrder;; ~ R' [5 W, T5 W& p% k* Y
part.move(@);-- load part) q, j5 E4 |8 {' M
@.CurrIcon := "load";
c' n3 ]* X! t; w! @4 H3 Q GlobalDistObj := part.globDestination;
0 P1 N' B6 X3 K) h! D assignLObj := rgmanager.rgAssignL;
8 z1 w/ z$ y0 o6 m) h, O row := assignLObj.getRowNo(GlobalDistObj);
5 e5 E+ M4 [/ F- P' N0 C$ r if Row = -1 then -- since 70
! [! x/ v( s; \ if lan=1 then
+ ^* F+ F% J: G, }* ]5 S4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 ?7 U* R' S5 _ E: Y# ` to_str("in der Andockstation: \"",?.~.name,"\""));
3 } [' W5 y: d3 S/ t4 [' O else
/ p7 @' U) W8 v% F* o3 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 o( O! N2 ? U; ?; X: y* P
to_str("in docking station: \"",?.~.name,"\"")); % i- d# v* Z L" v. Z6 R9 M. K
end;
, u$ o+ X% t/ w; b8 T: T( |9 I% e4 R3 V else: y& s) _0 e _; Y
@.Destination := assignLObj[1,row];6 t$ Q8 P6 n# d
end;
2 ?. s" b, @2 k. t6 i) K1 C newDirection(@);0 b. J# u% a/ [4 K- ]
@.HasOrder := true;5 \4 V4 |! B' ]$ @, E: F. R
end;
4 |! ]. r+ ]. k end;
6 i8 O! p% \: e, U4 v. N2 l: ]end; -- of the method
( x4 C& ^- R9 @; T6 M |