/* called by: entrance ctrl of the object 'track'
7 J5 W: N* y. K- Y*/
! H' v7 c6 ^, G- {" s! O7 ~is
- |7 L- `( B) |6 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" u4 b% x2 t! s; N) wdo
3 ^* _& `2 L& @ f8 R$ P* | Lan := rootfolder.Internal.Tools.AOLlanguage;
0 p1 s/ k% v# x if current = @.Destination -- else return: O3 ^5 Y6 _$ ^! t/ t
then
( z$ T/ `1 W& ]* ?" w0 f @.Destination := void;
) a: L9 v, t5 m! k' j9 L `: g: L if @.occupied then
8 [( W" P7 P1 H2 f; I part := @.cont;8 C* u! Q5 a2 _& h9 ?
@.transpOrder := void;
+ i7 U( i8 t: V& Y* R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* a# L! @% Y- w @,root.eventcontroller.simTime);9 V/ z7 G4 B! P
@.HasOrder := false;6 ~9 V' C& A4 j& K8 s3 t
@.DrivingHome := true;
4 u4 t, g5 k9 _6 O8 [( W8 {2 [. u rgManager.tryToStartTransOrder;
, S. ]% y, b9 v5 O if @.Destination = void
6 i7 l# p7 M$ s5 F2 ] then -- no transport order for vehicle @: }: e k* |; |: b
@.Destination :=
: j7 ?6 V9 m' k3 u$ w rgManager.nearestFreeStation(@,track.~);; P* N7 x4 ~7 x1 M3 D3 l
newDirection(@);
7 W6 q. B- W' H if @.Destination /= void then$ `- k- Z; u0 w1 ?
@.Destination.NumReservation :=
7 {4 ?) g5 J' V* n3 U @.Destination.NumReservation + 1;
! s1 I; K }7 {. m end;* B6 V- m% E" V9 {. O
@.CurrIcon := "drivingHome";
. A$ R7 Z: D+ X! c) \' l. O9 k @.DrivingHome := true;. \6 b0 D* n {+ h0 X* `: B
end;( h0 t4 K0 v' L0 f6 Q1 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- Y, ?5 x7 X. E/ { part := @.transpOrder;
9 n0 Z' J$ u% j- m* m/ b: W2 c part.move(@);-- load part/ g' G7 N; n+ ?" a% F' [
@.CurrIcon := "load";
/ [$ x! H; c) ^8 K GlobalDistObj := part.globDestination;) N7 `) J3 v% q( d( M) l" U
assignLObj := rgmanager.rgAssignL;- E( y7 u6 _0 W1 \
row := assignLObj.getRowNo(GlobalDistObj);
8 S4 i" s1 ]0 I/ |5 X: g6 S if Row = -1 then -- since 700 B! z* z g; F i' X0 ~
if lan=1 then
7 X6 s. u; } f; s- O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: K7 T& R& \6 ?; E" O% R to_str("in der Andockstation: \"",?.~.name,"\""));4 F5 B1 N( f$ k! p$ c Q
else
4 }) h/ B" F0 O# H2 G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( R6 D5 P0 M% M7 |- Q4 \
to_str("in docking station: \"",?.~.name,"\"")); 3 j, h) k) u- N! B5 A1 Q
end;3 B1 [% \. J. ~/ s* Z) j
else
8 \1 _- a6 ?1 [ @.Destination := assignLObj[1,row];- E7 V& `( c9 D; E! N* l* O! Y
end;
! a( o* N; A! X! U+ }! C newDirection(@);4 n, N" d! t. W5 r/ l7 C$ [! E
@.HasOrder := true;
5 C4 s( M( m- j- D4 h) [ end;
1 w9 Q1 E% i% a" r9 c end;; w( l/ ]1 e3 M; H8 t* O, U
end; -- of the method4 Y9 z1 S2 H1 a/ _3 {! k
|