/* called by: entrance ctrl of the object 'track'
2 R! a3 W; ?' a, r8 C5 H. N4 b8 j8 C*/( K3 C8 \& ? @/ [+ {
is
/ c0 S: {( N3 {1 F. _% e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ V! X. ?3 X1 p: X/ }! T: ldo& `# `+ R3 O K+ c0 _. L8 C6 F% l) y
Lan := rootfolder.Internal.Tools.AOLlanguage;) L; J1 u( W3 w& P6 j7 D; u; v
if current = @.Destination -- else return& g9 @1 e. A% T% j
then- d1 R. A( }: @/ b
@.Destination := void;
! ^+ d0 F2 d7 l# m% Y2 F if @.occupied then
) X: Y% R' k) k/ @ part := @.cont;2 e1 T- b$ O, Y5 V( l$ K
@.transpOrder := void;
2 F/ Z5 }' I% [ }0 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, z7 \7 ?# l4 T# T @,root.eventcontroller.simTime);! o2 S; Z/ {* V1 I+ v
@.HasOrder := false;) G" ]! c5 x4 j+ f0 ^
@.DrivingHome := true;
* H. u, n! N" G2 F8 | rgManager.tryToStartTransOrder;. K7 V8 f I; ^0 \# c0 V9 v: U1 `
if @.Destination = void( }. ?. i5 U. e2 o4 ~
then -- no transport order for vehicle @
+ K8 ^5 A, R' `( g* B& c9 \ @.Destination :=
}( U2 F1 x7 C& ^2 I rgManager.nearestFreeStation(@,track.~);
( V! u: S% ?; F# s2 N newDirection(@); ' c, v4 K$ c O4 N7 f: P- [
if @.Destination /= void then$ U' [/ I, i/ O( k
@.Destination.NumReservation :=
9 R( V( f+ [$ N* p @.Destination.NumReservation + 1;
! _8 h0 S7 A7 b) y6 } end;
/ E$ C0 a8 j- { y& w4 | @.CurrIcon := "drivingHome";& [8 H9 c7 N& Y5 k6 Y% l
@.DrivingHome := true;
! ~ ^8 D& B5 r" f end;
8 n0 V# }+ P/ m7 P5 V( } else -- the vehicle @ is empty, both vehicle and part are in the same dock station* r" Q4 @5 d4 m$ Z' G
part := @.transpOrder;
$ G- Q( N- b7 P part.move(@);-- load part$ H1 F7 B9 | `! S3 K
@.CurrIcon := "load";8 ]& V4 w. M0 {: G
GlobalDistObj := part.globDestination;
: P9 K; t/ g, u! y; u2 h% X assignLObj := rgmanager.rgAssignL;
4 j* a) {% g- F3 N row := assignLObj.getRowNo(GlobalDistObj);1 ^0 k7 N2 _) y9 d. `
if Row = -1 then -- since 70, D# L/ b ]5 P) G
if lan=1 then" F' F. r \$ H6 i/ Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( I0 f9 Q6 m' r! W8 h& X# _
to_str("in der Andockstation: \"",?.~.name,"\""));
* J6 R+ l0 a; N2 Y2 Q* b) q4 r else
' y) |2 ], D/ i4 S4 i: J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# ~7 y2 ~( M2 c6 |4 w$ e to_str("in docking station: \"",?.~.name,"\""));
1 {# A. s, |1 D$ U end;
% u1 F9 R" D5 j' t& J8 f else% ?4 j( D* k4 q* ^3 l! a( H
@.Destination := assignLObj[1,row];
1 m/ W5 L7 Q3 k$ B end;
% @$ S/ H& l- m2 @, u; z3 Y6 f newDirection(@);
* N9 n& n# x; b @.HasOrder := true;
, v! f$ d9 E# h, C, r end;
- J0 d9 \) M3 a7 _ end;' S6 d' w4 ~7 V8 F W
end; -- of the method1 @' L3 J9 l. j+ C! e
|