/* called by: entrance ctrl of the object 'track'! s( b) K! y7 U) {
*/
3 o! s: o8 B4 R& W" t6 f2 uis
6 B- m. a. \5 [7 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;: w! _) z0 ~) Q$ Q& r
do
) |0 L* O1 _2 U# n( D @4 x Lan := rootfolder.Internal.Tools.AOLlanguage;) Q% x1 Q( d& M" B# f2 Q
if current = @.Destination -- else return
! B3 M3 K! _- X then7 O2 w( c5 R7 H2 U6 a' o2 e
@.Destination := void;
, H" f& L F2 w, f& z if @.occupied then
, ?) Y E, k, c part := @.cont;
. V, a4 L9 T) j, a3 }7 w& O3 K' z @.transpOrder := void;
& f- _) u: Z9 y% i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, |1 M& f. N, Q0 i2 i: C1 e; ?
@,root.eventcontroller.simTime);3 t0 N1 w( y7 R
@.HasOrder := false;4 v1 j, a# j L$ n
@.DrivingHome := true;; F" m% b; ^5 I3 i3 A1 s
rgManager.tryToStartTransOrder;
' ~6 g( t& \+ J; x$ Z/ x3 Q8 D if @.Destination = void
8 r4 J% ^! s, W* O( g then -- no transport order for vehicle @
6 r, r1 ~& e+ U$ R% n O0 w" x @.Destination :=/ G7 Y9 c' N5 ^1 i& y* }( n
rgManager.nearestFreeStation(@,track.~);
2 q8 \; u! ]: Z" r' ~; } newDirection(@); * b5 C/ q1 ^1 E5 u9 L; a; q7 B
if @.Destination /= void then. F; X4 Y# Q5 v- p# j
@.Destination.NumReservation :=
# ]: b. @! [8 { @.Destination.NumReservation + 1;% @& {4 r+ n3 d' B e
end;9 `% K3 N E& ]4 b- `$ a: i& v2 E- d
@.CurrIcon := "drivingHome";% C0 K1 M' c, b
@.DrivingHome := true;
0 g7 s$ H# a& [: F* e* L; H end;6 ?9 a3 c/ z, P3 [+ _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( O7 R0 c5 X5 w! F% c9 B" d6 Y8 _ part := @.transpOrder;7 }6 p8 j( K$ v2 u. R3 K5 e2 D' S9 i
part.move(@);-- load part; w$ R/ p' D( ?7 p
@.CurrIcon := "load";
4 u K- D# j& |' [ GlobalDistObj := part.globDestination;$ ?5 y3 i; v N5 l1 V v
assignLObj := rgmanager.rgAssignL;
$ k4 M# P' Y) k- r8 G row := assignLObj.getRowNo(GlobalDistObj);4 c C, n$ f. p
if Row = -1 then -- since 70
- H% C% Q6 `7 h3 K+ Y# N. W if lan=1 then
0 o) _ ~0 C. e6 N7 i0 z* A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D9 j& ^) @% y, H+ Z# y+ y8 H6 d
to_str("in der Andockstation: \"",?.~.name,"\"")); o* E6 z) j5 Z9 G+ T
else* S8 A9 Q% T2 P8 C( ]6 v* F$ O3 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 f8 M! T, a6 _7 A' x, Q* U a
to_str("in docking station: \"",?.~.name,"\""));
4 G+ C8 u8 `2 f* l6 D& L, j6 Q j# T end;
! G# e/ a+ O$ m! u* Z* a: s else& Z; J: Z% Z2 a( s& e
@.Destination := assignLObj[1,row];. _( @" r A) s+ e
end;
* q/ P$ Q$ a" u. Y newDirection(@);; `% ^% [& b2 T/ y2 x" m% k
@.HasOrder := true;
7 Y5 }, i. P6 C" `0 o end;9 y; s$ r" A) m" z l7 w! t
end;9 M1 J) U: a/ r6 ?
end; -- of the method" r: k0 j5 v' o5 }
|