/* called by: entrance ctrl of the object 'track'
: k+ H' N& s7 ]7 O/ P*/* g1 v: ^3 e! e8 p1 Y' y2 J' a3 i+ K
is
, a! r6 d! C6 E/ s( B part, GlobalDistObj, assignLObj:object;row,Lan:integer;, S0 U4 T% j6 I9 c3 l
do
% I2 g* t, Z. p. n. @& z Lan := rootfolder.Internal.Tools.AOLlanguage;
1 N+ p' o- R! K& C if current = @.Destination -- else return
: V1 C% q3 C# S5 v4 h O4 D4 S then
& Y/ y6 o, j) P8 M7 n, ` @.Destination := void;
: o7 X- K! s( f* f( W+ A( z, Z if @.occupied then9 P5 n% m5 U+ j4 B! M0 Y5 Q9 E
part := @.cont;2 s ^/ [( O. V& I6 F
@.transpOrder := void;
, X* ]- i8 [. c* a2 M R: ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 L6 m6 ]- k* U @,root.eventcontroller.simTime);
6 {* b! b8 t9 l2 r v' u8 l$ f @.HasOrder := false;
, w6 Q2 g6 K6 x. |; ?; | @.DrivingHome := true;
; q( L- V P6 z @+ V" Z rgManager.tryToStartTransOrder;* ^# T& Y, Z3 p" k# `
if @.Destination = void* _* l: z8 P& g+ g6 X0 D+ t
then -- no transport order for vehicle @7 a/ d( i. J( t: i% B' E) m, s
@.Destination :=0 B: P% Z* |) N- N+ O& m* h& b
rgManager.nearestFreeStation(@,track.~);$ n4 h, H, [" J2 {, @4 y/ j' ^
newDirection(@);
: C( A) ]: H1 s1 M/ N: ^8 w if @.Destination /= void then5 O+ E% ]8 V0 ~
@.Destination.NumReservation :=9 z+ j% S% B% ]; Y! \
@.Destination.NumReservation + 1;! N- o) j: r4 m! i, f% U
end;
e x9 ^2 l% [# M& N @.CurrIcon := "drivingHome";
$ N6 }, ]: V9 r# n @.DrivingHome := true;# _" j% N3 X/ b8 Q. a6 s
end;
! h9 b I9 [! g0 F, N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- @) K% v( T: J9 g* E) c# R part := @.transpOrder;
+ ~% W; S, k; S+ v d8 i( J part.move(@);-- load part
* y1 I' o2 B0 t# X, w' w$ p @.CurrIcon := "load";
! r! g% y: q9 j' c GlobalDistObj := part.globDestination;3 u3 q" L- @8 @) _3 b
assignLObj := rgmanager.rgAssignL;
+ i, J5 d0 e5 m1 W5 } row := assignLObj.getRowNo(GlobalDistObj);$ `' B+ R* t! p) K8 {
if Row = -1 then -- since 70" D; a, @5 s, T& B7 Z( c* L
if lan=1 then) t9 A* R1 ^+ d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) D2 t. r I* ]. w0 m4 E% {
to_str("in der Andockstation: \"",?.~.name,"\""));. q/ a# l1 y* a9 q: _3 k2 e( {
else
' A+ Y; u2 Y1 ]& f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 G* t1 V4 b. k" ~ to_str("in docking station: \"",?.~.name,"\"")); " I* f4 d$ ~% A7 P4 y" C& A! D6 |7 V4 [
end;3 c" b+ ]/ ]/ U" h
else1 E' y: e5 n. V! k- r% ?
@.Destination := assignLObj[1,row];' s. m( L/ x3 c4 r! h0 v
end; ( ~, A! s+ r7 ]
newDirection(@);
. S v* E: m6 N2 E/ b3 E3 l @.HasOrder := true;
1 C7 ]: ?1 _6 \8 H" d end;
7 Y6 [# q) d& Q2 @ Y end;
, ?) W7 j' |3 W4 U5 Y+ Jend; -- of the method* a, v4 {, p% @( g. m5 L
|