/* called by: entrance ctrl of the object 'track'
; }! R* J7 ~0 N K m) G/ k3 H/ w8 B*/
( U: C$ t1 u" B9 @" p0 g8 D3 L8 wis( L, s% F9 f* g3 p, f' @: \' B0 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. }% B, ]7 r7 a: R' z w0 }- K/ [0 @do
5 H, {. N# T* [8 S6 H Lan := rootfolder.Internal.Tools.AOLlanguage;
& o# J% V8 B S! {0 O0 }% F if current = @.Destination -- else return
, p9 |# P2 ^, H% B- G. ^ then
H e; b4 k9 Y, L. V/ K& n @.Destination := void;# y. h# d: V+ b( D! M4 f3 y
if @.occupied then
' A; j. c: c3 N part := @.cont;
# Q+ U# ]+ _- Q9 d7 {1 ^ @.transpOrder := void;
s0 k. }+ j* t& `$ ~# z) K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ]- s+ c, h5 _( ]7 Q; Z, l& f @,root.eventcontroller.simTime);
9 ~0 u, X: ?* B* E @.HasOrder := false;* E* |! {' @' t' X; f/ k. D* G
@.DrivingHome := true;
# K1 Q4 [1 Y: _* E- h7 y+ t* u2 e rgManager.tryToStartTransOrder;
" t0 v$ s' L; ^5 y: h; h& G if @.Destination = void+ I% H }8 R6 N
then -- no transport order for vehicle @! D3 p3 M9 C: |2 v
@.Destination :=
$ m2 P7 n7 O% A8 { rgManager.nearestFreeStation(@,track.~);
- k* W& d0 a2 B% \ newDirection(@); - M2 X0 l% n$ J3 h& J" z0 \- Y4 ]
if @.Destination /= void then" R; j5 O1 L6 j
@.Destination.NumReservation :=, G4 R# q. y# @' p
@.Destination.NumReservation + 1;8 B' c4 g# K; J" G
end;
% \0 U+ i8 n- }" d$ C6 @7 N& |. d0 S9 C8 E @.CurrIcon := "drivingHome";
2 i) Q0 T4 C; q7 b @.DrivingHome := true;# h! s# a0 E4 t2 `& y, n
end;4 I' L3 ?0 E2 j) ~' y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& J6 V- E G8 j- ^5 `3 n& W5 |' W part := @.transpOrder;
3 J9 B9 m }, `6 Y5 Z part.move(@);-- load part
; p) O1 X% G: t, H- W6 j @.CurrIcon := "load"; A+ v# |" S* ^- Z$ ^# O
GlobalDistObj := part.globDestination;* J6 r& {, a! E( f! F' f/ ]7 }
assignLObj := rgmanager.rgAssignL;) {0 C9 U, J3 j7 C
row := assignLObj.getRowNo(GlobalDistObj);) d$ ]: d+ f9 Y% F* o
if Row = -1 then -- since 70
8 v. r& o0 O, Q) e: w+ t if lan=1 then
: @+ ^; Y4 q' T1 y2 [7 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' v0 B' i! Q9 ~ to_str("in der Andockstation: \"",?.~.name,"\""));, m' E. a% e$ d* G7 s5 S( i
else
4 q5 c0 f8 i# ~! m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) \" M/ ]4 \2 z1 X) Q% e
to_str("in docking station: \"",?.~.name,"\""));
/ Y/ }: z i8 a0 y end;) |+ a" ], m3 x; J( b6 q5 S
else" A4 G+ X/ v! x) h2 u$ E
@.Destination := assignLObj[1,row];
+ T. E+ u' E. Y9 U- ~ end;
5 y5 w& Y1 T7 o% h9 T newDirection(@);+ P$ _3 z: x/ {) T
@.HasOrder := true;
9 b) b! d1 k3 `* f end;
0 a, L( q/ G9 u# ^! e, n+ h end;
) ?& h* \$ H2 T) _end; -- of the method
2 N1 s( C# J) q9 S8 X |