/* called by: entrance ctrl of the object 'track'6 ^$ |1 g# m) g# V) I2 p* U
*/" X. i2 Z2 L: @5 U* B
is
1 c6 h9 l) L" P# }% Z; v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. c1 x' m& ~( s2 @7 Vdo
0 |) ?9 l6 G/ V) i+ |; }! B Lan := rootfolder.Internal.Tools.AOLlanguage;" u% H# `! |& X2 X2 X; r d; |
if current = @.Destination -- else return4 t/ _; V8 A5 f
then
; k0 o3 l: I( H, t0 g2 G9 z @.Destination := void;1 t1 ~( R2 B; r) a5 B9 M2 ~
if @.occupied then
s+ Y; {3 o' j" o' w9 ]8 S part := @.cont;9 [+ i2 G7 F' b4 Z9 N5 M8 t+ ?
@.transpOrder := void;& [7 w( O% \* @, c" F- D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z% l6 s1 t' P% h) K2 C @,root.eventcontroller.simTime);
( I& h3 @: U/ F! Z/ b @.HasOrder := false;
: r8 Y9 F; Y- ~6 B$ a4 I; M @.DrivingHome := true;9 c& B# }" U) a
rgManager.tryToStartTransOrder;
+ `& |" b0 x# D if @.Destination = void
: ]: J4 d9 c! k then -- no transport order for vehicle @, L- e3 m/ e! f M
@.Destination :=
/ Y2 y9 v& A5 S rgManager.nearestFreeStation(@,track.~);
7 T* Y$ f5 K0 u# s newDirection(@); ) o3 J b& i' }7 T" W8 f2 I
if @.Destination /= void then
% q, _: m; o1 q8 [9 N! w, ]: `8 ~ @.Destination.NumReservation :=
, \ ?& e( Z* ?4 B2 v. T" Q( q @.Destination.NumReservation + 1;( Q9 z7 ]( [. I2 z5 v& ^0 J1 B
end;
1 Q; l5 M3 L A4 u8 [9 R @.CurrIcon := "drivingHome";
; }: \) d6 e# f% h @.DrivingHome := true;
) M, y/ b- i- A9 o& z1 { end;
3 E2 F* O8 n& `) F% k+ K: y8 y! @# L else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 \4 ]7 {' W' ]
part := @.transpOrder;
, n3 n3 ?7 r) |. X4 {1 }9 U2 \& E' s part.move(@);-- load part. [6 ^# E# f. U ]) ?
@.CurrIcon := "load";
$ g! Y2 p4 O% B! ?1 N! m4 s4 \ GlobalDistObj := part.globDestination;9 Z2 F4 g+ z8 L5 ~! s
assignLObj := rgmanager.rgAssignL;- V. ]0 ?/ D4 T8 \8 y3 {( s& n
row := assignLObj.getRowNo(GlobalDistObj);8 V7 |+ `, l( Z2 ~# N; Q
if Row = -1 then -- since 70
4 y8 v' ?8 |+ t; J4 } if lan=1 then5 U# \, O4 ]" J2 a( x2 l* ~/ y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 u! ?, N" h6 l2 ~/ k1 ]8 d to_str("in der Andockstation: \"",?.~.name,"\""));% _% p( M, G* M. W8 ^, H! t
else
, g; A( K- Y! h$ Q% Z5 G" J1 C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% l% x. N8 r6 ]
to_str("in docking station: \"",?.~.name,"\"")); 6 |6 | m* c& `$ e3 ]
end;8 M6 B3 H; r: \2 Z% ?/ |
else
5 Q. Z5 o4 x! `. L) M @.Destination := assignLObj[1,row];1 P+ Y/ L4 F0 ^
end;
( G- }2 | N5 k newDirection(@);
2 }4 _1 z/ x/ Z0 _ @.HasOrder := true;
1 h; y2 \+ T; T9 b* t3 [ end;" ^% h! }& \( E+ w
end;
' c u2 @% @$ O) O5 S+ V4 \( X" lend; -- of the method
* \2 O2 a1 `( M$ x* z |