/* called by: entrance ctrl of the object 'track'/ ?, c# N) \9 G: X, ~5 ?0 l" W) O. M
*/
5 J( R% a% Q0 _6 ?8 F2 his$ n! h. e/ F9 q. O2 i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. g5 x6 K6 a2 F& a" D
do* o* L1 i2 b5 i0 s+ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
! P! `2 F! v+ D* F if current = @.Destination -- else return2 X3 g/ b& ~" A8 e
then
* v5 c- A2 j- i. L0 k @.Destination := void;
7 i0 p( H6 b6 c+ |3 I if @.occupied then& |% Z& y. }3 R
part := @.cont;% t; k2 E; p: @0 e8 a+ h
@.transpOrder := void;
* M6 z& v4 x# c0 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* f7 y: C( r! t7 E4 [0 ~
@,root.eventcontroller.simTime);
+ }( B' d- f* h, M2 k# g @.HasOrder := false;& q- g: G! K4 X
@.DrivingHome := true;
8 S8 @' K9 z6 T* E. H; ^ rgManager.tryToStartTransOrder;8 k) ^' v7 U# V1 v3 F0 F# m
if @.Destination = void
% A2 Y% g0 Q2 [. G) i then -- no transport order for vehicle @- i/ ?- j0 c0 n
@.Destination :=
) g+ j5 H8 g, T+ m# H$ o/ a rgManager.nearestFreeStation(@,track.~);
6 W1 c2 p" C9 A newDirection(@); ! @8 t5 d- H/ H g* _- ~$ t
if @.Destination /= void then
3 O5 S/ c* X1 D& }: l @.Destination.NumReservation :=
6 }6 K# ~2 |+ v* F' \ @.Destination.NumReservation + 1;9 D2 ~& I: T: y! s! c9 N }
end;8 o/ y' R. }0 _0 e( P$ l
@.CurrIcon := "drivingHome";& a; E( `6 N$ \0 S
@.DrivingHome := true;2 G) y) P. L, k1 {9 b! I
end;
7 n$ _5 a; z, }7 q7 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station& _5 C5 j% }( r1 a
part := @.transpOrder;
. N2 R! L5 E+ q* ~( Y- d part.move(@);-- load part u3 e% m; m. C
@.CurrIcon := "load";
2 c" Q$ D- G$ J9 J GlobalDistObj := part.globDestination;% `8 @* o- T7 s5 b( A6 ]6 \% X4 x
assignLObj := rgmanager.rgAssignL;
% }4 X8 V+ d% d! t6 b% g, K row := assignLObj.getRowNo(GlobalDistObj);4 Z! {: A: v! p* ?! X+ T9 {
if Row = -1 then -- since 70
) g0 Z8 v' B, J7 L if lan=1 then7 s. Z* u1 ?( ]7 Y4 f2 |" n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 q7 Q, y3 ~1 X% n* I O2 \
to_str("in der Andockstation: \"",?.~.name,"\""));6 N! u! R- v0 T' B% ?8 j$ b9 u
else4 S9 \6 H3 u+ ]- d6 l& D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 X4 S- E' U4 Y0 h9 _4 F to_str("in docking station: \"",?.~.name,"\""));
9 R7 a+ w# u9 d; h* g5 I end;
H$ X$ \, D$ F% W4 r g else
q- C- e# U- Y* w1 R @.Destination := assignLObj[1,row];, \! O: ^4 Q7 K8 a
end;
" }1 |: U4 M$ `. Z newDirection(@);
, ]7 P: p7 o% }, x3 l" H( z) w7 U @.HasOrder := true;1 y& l) e$ d) w2 s
end;. N/ b8 }) h7 J8 t/ ^5 y2 Z# ^. l" b
end;
9 N4 ^- |9 Z( n9 Oend; -- of the method
: T b1 P+ m/ ^' P3 N% H |