/* called by: entrance ctrl of the object 'track'3 Y7 H4 `- ]2 i
*/7 [, @" V$ f8 p
is
3 O# ~4 Y: n5 ^* G" }/ V part, GlobalDistObj, assignLObj:object;row,Lan:integer;! K7 Y0 ] G5 s! x+ a0 v
do
* H; b, `* a; J Lan := rootfolder.Internal.Tools.AOLlanguage;5 j* C4 ~! p: N
if current = @.Destination -- else return$ i6 C, i1 h3 I" Q, _0 [
then! f0 C0 S6 C! e" y; \
@.Destination := void;
k! h! Q4 L$ ~ if @.occupied then
3 `. ]6 x+ N y part := @.cont;) R* z1 Q+ A7 Z: E( w4 l" r
@.transpOrder := void;" u* |' P2 A o _/ K8 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Q8 {; w; L* q. a1 D1 M4 v
@,root.eventcontroller.simTime);0 }* G% F( T- ^8 _; i
@.HasOrder := false;
8 u* S8 C7 j/ t, a; P6 c @.DrivingHome := true;! N9 }' z# M4 [
rgManager.tryToStartTransOrder;( w4 g0 k v K) U( T
if @.Destination = void
$ m# [7 H4 l; y$ u/ D then -- no transport order for vehicle @
2 ~7 c- J8 d! X4 v8 H5 x @.Destination :=
( |3 T' Q7 j4 D0 I- F2 ?7 p" l- | rgManager.nearestFreeStation(@,track.~);) g T; m* t1 O! R: l9 t' P# ?
newDirection(@); / t5 y' I+ l3 }! r! N% S1 {! c
if @.Destination /= void then8 a% G0 v8 h) M0 G' ?% Q
@.Destination.NumReservation :=) z. H! j% i/ R' G- S
@.Destination.NumReservation + 1;0 X" n8 T) w4 |
end;
4 R/ m9 Z+ A/ H0 s/ t' Z) L @.CurrIcon := "drivingHome";7 P: M4 \: n" \$ k
@.DrivingHome := true;
: \) _3 ~5 s% O9 P end;) C5 A% x. o; }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 Q0 Z9 R) ]5 S4 u, E3 p3 _. f part := @.transpOrder;
% [7 q' G- w3 n part.move(@);-- load part4 K7 W" V% R( `- `' [9 J) f0 Q* }1 t
@.CurrIcon := "load";
L- @0 e7 h/ _8 H. Y4 a- d GlobalDistObj := part.globDestination;
~( V' ^$ i( T7 I! J' p" X assignLObj := rgmanager.rgAssignL;/ _$ ~/ O2 I$ n+ Y0 p7 ~3 O2 i
row := assignLObj.getRowNo(GlobalDistObj);" I3 I+ g( E, ^1 g
if Row = -1 then -- since 70
8 A5 O6 W" O: `& p0 x" O if lan=1 then7 A) |2 M: [: V( V s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- \4 S4 X3 \) X- T6 i
to_str("in der Andockstation: \"",?.~.name,"\""));/ j; ]( A3 _' q
else; g' @$ o" {- z$ w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 I# _% j7 d5 `5 |1 K4 N( L4 C# S to_str("in docking station: \"",?.~.name,"\"")); 9 P* V! M2 }0 R9 h& |9 }/ o
end;% K2 o6 b; }! O) q
else
# |& u6 N' `( ~: }0 I0 z: v! @! B @.Destination := assignLObj[1,row];
: \, M0 F" I1 K9 P3 C end;
K' B9 f- c* }6 q( O newDirection(@);* `/ J1 }* |& v0 {
@.HasOrder := true;
+ b' ^& f0 P6 ]# ]1 p- K i3 | end;
3 u/ p. ?9 t* d. ]( P- U* y' x end;$ G' x' V4 @3 T q
end; -- of the method
6 y; B5 R [* s6 h/ o |