/* called by: entrance ctrl of the object 'track'
q& o$ K) _; ~2 U9 R*/
4 J" c# q. T' m& C% g) X6 cis
& u( H' |% Y" E2 n- \" J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 C# o- \1 L" \, ado
: Y4 c4 y, m* r" k. d+ R Lan := rootfolder.Internal.Tools.AOLlanguage;+ |0 x* W3 J4 S+ ^9 B* j
if current = @.Destination -- else return
, L3 x" g( ?( e0 s then" _/ O% D" |; @8 Y; X
@.Destination := void; j7 C' [& L) h2 T* b; ^& Y3 [
if @.occupied then! i3 C' p) c% q9 i2 @3 u
part := @.cont;7 M/ p9 L. o) `" V, ?: t
@.transpOrder := void;
4 O3 U5 |% L T# T, C( `' R* H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ S7 P) K' I; Q& H- U
@,root.eventcontroller.simTime);: I$ p5 V- W/ x% F
@.HasOrder := false;( |. C- k) B+ e( Y& L$ g
@.DrivingHome := true;
- M6 ]: X! W& L rgManager.tryToStartTransOrder;
2 _7 V' J5 ^+ y if @.Destination = void
$ X$ e; \3 i( a# r0 s then -- no transport order for vehicle @0 z+ f8 r0 G! I, I3 K; \
@.Destination :=
V. L+ `3 F5 C2 |. p rgManager.nearestFreeStation(@,track.~);2 u1 o% ]. l! d' a
newDirection(@); & Y5 j, `. u% V) X/ b, R
if @.Destination /= void then
* C! @" C3 k' z, N& w- i: ~5 c+ U5 O @.Destination.NumReservation :=
- D L* R. f2 i, U' ?0 o: J* C& K @.Destination.NumReservation + 1;
: R* N8 Q! R1 _- O end;
8 N/ P2 L2 _+ N1 e# ] @.CurrIcon := "drivingHome";
7 F5 }# U. W8 s/ C5 V6 |: M @.DrivingHome := true;
1 U5 H" l! ], j1 B5 ]7 } end;
3 v; E3 W: H4 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 M: F. K# E! N% ~- ~' d) ] part := @.transpOrder; f4 [3 M l9 t7 p; z) @7 P2 a
part.move(@);-- load part, |% o6 r. M+ u c$ m- X/ {
@.CurrIcon := "load";- e ~ m+ B& _+ v7 i4 O" @1 ^
GlobalDistObj := part.globDestination;
5 b) X3 q, c2 Y3 _- d" g assignLObj := rgmanager.rgAssignL;: b7 g& ^8 \9 M( u! w) J
row := assignLObj.getRowNo(GlobalDistObj);0 h, W- _& j8 K3 |6 b% O
if Row = -1 then -- since 703 j$ v& Q/ u3 Y: ]1 E9 s- \$ |! C# I
if lan=1 then8 {7 o8 Q6 I' o0 R/ s% D8 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 i- u1 y0 C+ \7 B5 h. j; b to_str("in der Andockstation: \"",?.~.name,"\""));
. d! W0 g- K# t+ J, Z1 k else
6 `# q+ q% H, L0 a4 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 E$ v t. N/ v" j to_str("in docking station: \"",?.~.name,"\""));
! Y9 S. q& h: o7 s: C2 K end;
+ S+ `( ]# q3 q3 P9 M; w- T else* Y ^, F. M5 t9 `
@.Destination := assignLObj[1,row];
/ I- z9 W' m! F G0 p& H7 D. R end; 2 K0 n, t, K1 O" f R& J
newDirection(@);: i3 l0 b# v& x2 w9 B' @: i
@.HasOrder := true;* B4 Y& i. n1 B* r9 h1 L
end;8 _. X% E, H1 g1 g( `& e( H4 j
end;* x. N8 }* k% k, B
end; -- of the method
; d9 M! ~; x6 k! A: a2 D9 o, E |