/* called by: entrance ctrl of the object 'track'' I1 J/ k) F8 ^' i3 F& @$ j
*/
u+ U V% `7 m' q) Zis
* a* b+ i% j( G, T8 `8 w5 f' f) d part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 f, n* o" ?5 u2 H
do
/ ^$ M" b+ r" j. C Lan := rootfolder.Internal.Tools.AOLlanguage;! a V( J6 @; V$ e) V
if current = @.Destination -- else return: w) t3 C9 L; a( X. \
then+ x: M7 b+ |! A
@.Destination := void;$ z' U- ?! a* d
if @.occupied then
$ U% P$ g) p v3 L; F7 {+ _' x part := @.cont;
/ N3 H) M* o' B @.transpOrder := void;3 {1 B4 U+ b$ X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' e) e# x2 Z8 k5 C& b- d: _4 m @,root.eventcontroller.simTime);
* [ P* T/ h3 ?3 K& f6 M( r @.HasOrder := false;
$ m5 l0 p( Z0 z5 k* J @.DrivingHome := true;
2 [: |9 ]- Z) [4 H2 W6 c% L rgManager.tryToStartTransOrder;
* q8 d$ d6 t/ W1 p; u1 g if @.Destination = void
2 |" P* u8 h7 Y8 T& P0 S6 T. M then -- no transport order for vehicle @
4 F; |( |+ j$ I( L* L @.Destination :=
" r+ k6 Y: ]& L+ K9 H2 ? rgManager.nearestFreeStation(@,track.~);1 _. `: T" `$ I
newDirection(@);
- a) X! F& t4 y+ b: {) _: F# c if @.Destination /= void then7 [/ F4 X" H- Z4 m# ^
@.Destination.NumReservation :=
l; ?; J+ o9 P# g7 g @.Destination.NumReservation + 1;
+ P% r* }" J1 I1 W, i3 I5 c end;; c' N6 B* b9 A! L
@.CurrIcon := "drivingHome";
/ n& q. } K2 s3 g+ o! ^$ h% G @.DrivingHome := true;
) d2 j; F5 B* o# b8 |: d0 p$ Z5 m% ^) P end;
/ r V9 T/ y7 C) p8 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 K% a8 o- X0 s! S part := @.transpOrder;2 d1 G& R* v I$ E1 p+ z
part.move(@);-- load part- S* Z, [. F$ Q& u; S# G
@.CurrIcon := "load";
+ b2 v9 l. x1 M9 H( E GlobalDistObj := part.globDestination;) Z- j; q; o; [* p- |- O
assignLObj := rgmanager.rgAssignL;
" G% g# ]3 L6 e1 d5 j$ ? row := assignLObj.getRowNo(GlobalDistObj);
& I/ F- P' i" Q, p% D% E" w0 z if Row = -1 then -- since 70
( n7 [4 Q7 ^9 B- e! Z/ ^) u2 y6 @ if lan=1 then/ p( I0 y3 I; b- o2 i9 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 j0 x* ?) r) D, Z; u4 f to_str("in der Andockstation: \"",?.~.name,"\""));3 j5 k( h/ F0 M3 X8 e
else9 e8 s9 K$ O R u8 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 m* [6 g* U% j: L to_str("in docking station: \"",?.~.name,"\""));
+ H5 V' _% g8 c/ D4 c end;. W5 I& @! ^# R- B, I) }
else: X! F0 |& F1 y d8 R8 w/ g1 w& _
@.Destination := assignLObj[1,row];& I! [7 j( G. G4 z0 G
end;
% t3 p, U; q) {( `! y c5 r. T newDirection(@);
! p9 [/ P4 d" h; F. m# A. F7 ]. t @.HasOrder := true;
- ^) D) @) D* r end;
: F, o) j6 ]! h% r' }: p end;
: u6 b/ ? R6 ~' c7 y( Nend; -- of the method
8 s" ~$ {. R" E) F |