/* called by: entrance ctrl of the object 'track' Q3 ?% ]" K4 a2 w$ J- F
*/7 F; m8 O+ F* j$ Q+ E4 u: \
is
9 Z& a+ R+ U& M) s- ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& I0 R l0 _3 |! u( ^3 ~" vdo
) N* e6 ?# {8 R; p9 Z. O2 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
' g. m% e% A+ N4 N2 z if current = @.Destination -- else return
1 h2 x7 l2 U0 W, N u5 V( S then% K% R2 a, l- k/ j! @0 t
@.Destination := void;
" v, F! X) [; \! K1 g if @.occupied then
( R1 \/ w7 J: X6 z part := @.cont;
# q( B& u( I4 T+ g1 y" F5 t @.transpOrder := void;
- E. H x6 x0 }$ \$ R7 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \# z C& i0 @% x2 V @,root.eventcontroller.simTime);
& M" y- b8 U6 F; _( j @.HasOrder := false;
% ?1 K3 k- ]0 T3 Q @.DrivingHome := true;6 O) C% P7 p7 d/ c
rgManager.tryToStartTransOrder;
5 f. s7 A' V) e; f- C if @.Destination = void
8 o4 Z& ~* S6 e) X4 s- K then -- no transport order for vehicle @3 j* J( A: r6 [
@.Destination :=( b' K$ g9 ?+ w& E- {- B, n3 L
rgManager.nearestFreeStation(@,track.~);
! \; q* _5 m/ Q& ^/ i- _ newDirection(@); 8 ?# O) e; T0 j$ T* |
if @.Destination /= void then
+ Q$ [! I0 N; u2 I& _0 ^# K7 J @.Destination.NumReservation :=
! z) J+ w0 O# ~; X h! Z4 _ @.Destination.NumReservation + 1;
* s7 A5 u4 P+ w' q. t7 @ end;
" b8 V$ X8 i. n @.CurrIcon := "drivingHome";
" _- B4 g/ u' i+ q& L @.DrivingHome := true;
2 A# h( e' ^, ^- m' U: t6 V end;- P) [4 S1 J, _" V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- u# Z# S2 b9 |; `: h' }& G
part := @.transpOrder;
& s, J% T# F$ w/ B3 h. V part.move(@);-- load part
6 `% A6 I: u" W0 ` @.CurrIcon := "load";
3 q0 j6 `* R' @' [- g: Q( Z, C8 r GlobalDistObj := part.globDestination;
D4 B& L; ]+ J assignLObj := rgmanager.rgAssignL;8 u' ~# ~. h3 |$ N; ~2 K* f6 F F
row := assignLObj.getRowNo(GlobalDistObj);
* V- F6 U9 {5 g' P7 l" m& a if Row = -1 then -- since 70
0 s2 Z) d8 @( p a7 p: u if lan=1 then
0 B0 \3 V# x$ S6 S5 @$ k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" j% X4 x, S% Z0 C: L% t to_str("in der Andockstation: \"",?.~.name,"\""));
$ U4 B6 W$ o$ i* U/ ]1 | else
$ H% n4 _* c, u5 b6 J5 M" E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," ?9 V) t+ a0 }" [' N9 |; |8 |) b
to_str("in docking station: \"",?.~.name,"\"")); , Z8 b, ?( A7 y
end;
1 Q3 S3 @5 s; H7 B0 s' W) `9 \+ O else* |% h0 S4 m' B# p: n! Y. F
@.Destination := assignLObj[1,row];
; u) Q5 A4 H- }0 Q9 c end;
+ f7 u( t+ K5 [- k4 |* T# j% H newDirection(@);) x* }4 c1 p" v
@.HasOrder := true;
: ]1 e- _, _3 N$ [5 j* o) Y end;- q' p; q. m. a
end;
' k B6 d) H; A: Y# ^; o% oend; -- of the method' }% R1 Z& z. \1 F" E4 i
|