/* called by: entrance ctrl of the object 'track'
2 h! z5 f7 v$ ?& E3 G2 n*/
d4 G Y' s& S$ L" @* mis
$ n: }& |8 D) P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 @) ^% j8 G+ B9 H R' X/ Udo
9 }2 A6 m g8 ?1 h% `0 k Lan := rootfolder.Internal.Tools.AOLlanguage;
" V0 h, D- j6 W1 [9 |6 H& S& d if current = @.Destination -- else return' j: G |) B2 ~5 |
then; ^, O/ x4 H ?) ^1 O0 s& e7 x& C
@.Destination := void;4 C& Z2 j2 o* b M: p
if @.occupied then
' j( p j) [4 O9 } part := @.cont;6 Y/ w7 }: P' T. b, G
@.transpOrder := void;) ^: |5 \- N9 `, h* Q9 G& s$ ^) f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 N$ q$ }. F) M P @,root.eventcontroller.simTime);
% M7 V! t. \9 l/ |2 f @.HasOrder := false;! Z( l+ O, h2 @8 Y7 J
@.DrivingHome := true;
- ~; d$ a, Z' P* }; K- O0 {: E rgManager.tryToStartTransOrder;' w H6 O4 X! Z& J
if @.Destination = void
( S9 I9 \' ]* Z0 ^ then -- no transport order for vehicle @
) h2 P3 Y. P3 }2 s) ]6 b7 g& \# F @.Destination :=# H; Q2 M5 e5 A- N1 B5 `
rgManager.nearestFreeStation(@,track.~);
2 @) h. m. U6 p6 c) b newDirection(@);
# `! H2 z4 c( G/ T$ u7 G- X if @.Destination /= void then
& f2 x( | W% k- V3 q6 N" y @.Destination.NumReservation :=
. f+ Y. z8 d6 P7 G @.Destination.NumReservation + 1;* ?$ K. K7 ?( Z$ J
end;
+ ]: _ g( E! Y, \) E1 ` @.CurrIcon := "drivingHome";) A0 n% P# e# g( [# U( J( H& T
@.DrivingHome := true;6 Z- @. U4 ?2 @8 @# v) c6 C v
end;
! y, \: {' w% @1 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q8 @; `4 B0 G: V5 J( K6 h( d part := @.transpOrder;2 s2 ~5 y# |% h# n/ o
part.move(@);-- load part. A: {; Y* o9 L8 `3 u0 e2 W5 v& |
@.CurrIcon := "load";
7 T- e. }5 ?/ n, Q: r GlobalDistObj := part.globDestination;
& ?/ B: w# v5 P) d( k7 M, u assignLObj := rgmanager.rgAssignL;- {4 F; T5 i4 p) d' K* o
row := assignLObj.getRowNo(GlobalDistObj);# p) J( g( y4 _
if Row = -1 then -- since 70
/ W/ X. \0 d* l* B1 V5 \ if lan=1 then' b3 ?8 P$ C- E' J( d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 [1 \$ g8 `' h0 y( _ to_str("in der Andockstation: \"",?.~.name,"\""));* e! D: o' }4 p% [% T
else% B- L3 b1 P5 H( W2 e# |( B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) s3 d, q; o$ j: c3 J to_str("in docking station: \"",?.~.name,"\"")); , h1 Q/ x1 b; V$ Y: m O0 k. C
end;
! S; L7 {2 e) _/ T4 @6 { else
( {$ x7 B4 p' ?; [& \$ U @.Destination := assignLObj[1,row];
& x+ ^& q5 L9 y end; 9 S/ m: W2 Q( Q% [ I! g
newDirection(@);
$ {) S1 c( W$ G% ` @.HasOrder := true;
7 p$ M1 j2 R8 ?: o) S, Q6 l6 M end;
5 y( a4 l# i3 w) k- s; @& p7 Z end;
- f ]) w' h0 k" z) dend; -- of the method
* p; H( V7 y: O |