/* called by: entrance ctrl of the object 'track'/ d: V: G, H# W C
*/9 z* Y/ ^5 W+ _3 T$ d3 D7 r2 |: @9 t
is
! l0 x; ?6 ?8 }/ Y4 M: j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# v; e1 f: `0 o# x: H F+ b5 udo) v3 `, _7 A) S; Q! s( L- V: D
Lan := rootfolder.Internal.Tools.AOLlanguage;/ L; q" ^; i* \2 h
if current = @.Destination -- else return+ v/ G0 K0 K2 B- p/ B
then
3 q# x( p: }* i% \+ v/ ~1 d5 X @.Destination := void;
: A6 P$ l) S9 x P1 } if @.occupied then
6 X; \* n: G9 \- b6 t& S/ i part := @.cont;
5 v4 T* H4 `, d1 ]- O @.transpOrder := void;
; C* ~: B: a! `2 S3 K( x i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
i2 s2 P7 W3 W* N) B @,root.eventcontroller.simTime);
: l* D" Q7 x0 V. c8 H( M @.HasOrder := false;0 [. d7 C0 D& V
@.DrivingHome := true;' e5 Y& y1 `. h) Q7 p+ ?
rgManager.tryToStartTransOrder;
) X1 P1 N4 ~6 t! j0 @1 d6 u if @.Destination = void
4 c4 ^) ~2 X. e! V then -- no transport order for vehicle @% _$ c" {! j7 w, R! w6 r. G
@.Destination :=7 v1 p4 \9 b; f* l- P
rgManager.nearestFreeStation(@,track.~);
/ [; j' r# {3 q5 T+ r3 F newDirection(@);
, j; y1 n. _. h8 n0 ~" o9 i+ l if @.Destination /= void then
* G+ J; g4 J% B @.Destination.NumReservation :=
/ E1 B Z. W, H; H @.Destination.NumReservation + 1;
" D5 v! @8 c/ N2 z1 x" Q, D end;
4 ~( ^; b1 U; c. a" s5 d @.CurrIcon := "drivingHome";* I8 Z) t- D0 p+ D& E
@.DrivingHome := true;7 Q1 h' T( g& g6 x" m! h% N
end;
3 A+ h' A7 _) @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station& @ K( d4 Q( E# }
part := @.transpOrder;2 e9 q: J+ ^9 O8 J; c1 H2 Q
part.move(@);-- load part/ x/ H+ ^$ R0 e$ N& d
@.CurrIcon := "load";
5 @* b1 s1 Q' I3 I GlobalDistObj := part.globDestination;
2 d' Y6 l3 N1 ^5 g assignLObj := rgmanager.rgAssignL;
( l7 _1 C. j7 T: c. B5 v: F: P row := assignLObj.getRowNo(GlobalDistObj);
4 a/ x$ p( t" v# O* ~) d if Row = -1 then -- since 70
% Q/ H, r1 D& P2 x8 V, D if lan=1 then/ P9 u _/ k# ? ^, k0 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: x' y* L8 K2 z/ J8 h! r
to_str("in der Andockstation: \"",?.~.name,"\""));
, D! Q2 v% k5 ?% y6 x( R2 } else4 C- ?: c: ?4 M1 ^4 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( Q1 E2 e; s/ `2 N2 \$ ] to_str("in docking station: \"",?.~.name,"\""));
2 U; A8 U# g5 y" x, Q end;; b {. x3 H; q h
else+ N& f1 y Y0 y( i: L( {
@.Destination := assignLObj[1,row];
7 B; |; l+ q" v3 V4 v end; 9 l3 j& `: D; a+ I
newDirection(@);
# P0 [/ b: B3 K @.HasOrder := true;
2 }& p' @& H4 _! l) \' p& k* [ end;
9 k& i# c8 Z5 \/ Z0 ?6 O$ W end;7 v' S% W; n7 u K
end; -- of the method' f7 I! `8 ^. q" z4 e- ]
|