/* called by: entrance ctrl of the object 'track'
7 d* r" M1 J& N& z+ f2 H L*/5 a0 ]3 P- E- `7 M# v
is
6 d$ l# V% l% z2 k# n& s) J7 _6 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 z* p5 ~7 {6 m8 X4 p
do+ a% b* `* K/ P1 W0 f5 D
Lan := rootfolder.Internal.Tools.AOLlanguage;
# m( \7 ?$ T+ ?. m, P/ x if current = @.Destination -- else return
. e, C5 y0 y1 \, i; f4 ~5 D( {/ G then
' f' S7 {% O3 P8 t0 h; T6 W9 g3 i @.Destination := void;5 u: W, H- m8 r7 z% _
if @.occupied then$ ~7 [! y# n" `. C( a% s+ }
part := @.cont;$ M$ K) R0 K5 O7 W. E" F
@.transpOrder := void;% T3 m0 m7 u w8 e& M6 r" j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 w9 @3 [! T! p
@,root.eventcontroller.simTime);5 v3 j P: I8 S" s7 g( Q6 X1 i
@.HasOrder := false;( ?/ L. K" t% T) W
@.DrivingHome := true;; j7 ?7 Q/ y6 P/ y) Y& g& Y
rgManager.tryToStartTransOrder;6 y& i& A* W r; R# M0 ^0 N9 D4 h' S0 v
if @.Destination = void( l3 I* w0 T# ?- L* @4 u6 \
then -- no transport order for vehicle @
0 T. t0 S6 F+ c @.Destination :=
4 h& t1 Y3 s; k0 P rgManager.nearestFreeStation(@,track.~);; Z* S+ R+ K1 [0 j
newDirection(@);
% |6 I2 y. @; @ if @.Destination /= void then7 B+ q" S1 J6 E+ [( x
@.Destination.NumReservation :=/ B- m2 \& A$ A1 `
@.Destination.NumReservation + 1;
0 ~) u# \) o. L2 [9 q7 J: g end;
2 s8 a: y9 H3 K1 c# x) l7 A @.CurrIcon := "drivingHome";- `1 D+ u9 ~; i1 P% H
@.DrivingHome := true;
7 S7 J( c, \5 q9 s& ^ end;* a \/ _8 y* i9 e$ {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% Y3 ?- k5 g1 [0 S% U% z- d5 {! `
part := @.transpOrder;! ^# P; B% u% i7 u: [2 A; E
part.move(@);-- load part- f% Q& A9 @! [' m$ o. U/ ^. A
@.CurrIcon := "load";
8 j ]5 g' z" R# x! H* C GlobalDistObj := part.globDestination;
, i6 V, S7 R' h; X0 K" ]2 T" m. Z assignLObj := rgmanager.rgAssignL;8 D( }( `( E* i. _
row := assignLObj.getRowNo(GlobalDistObj);
/ ?6 m1 z+ [8 a if Row = -1 then -- since 70
' w7 |% d9 T+ B0 Q if lan=1 then
4 w4 k7 A, S P ?7 [8 `- I0 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 e8 W; a8 e9 n5 H' W
to_str("in der Andockstation: \"",?.~.name,"\""));
) X% J p! b) A2 `: r4 f1 k else
" t% v5 n. j/ d8 b# ~& Z& D# M* m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ d# |/ q" B" B2 \, \ | to_str("in docking station: \"",?.~.name,"\""));
0 e$ H# C* Y1 [& _- ], H) ]. i end;1 k- _% J" r& m2 u) z1 P0 z
else) S6 j$ ^8 h( S
@.Destination := assignLObj[1,row];. D r# Q2 W1 d) @/ j( S
end;
1 s" c( j0 z; U# J+ e4 {$ | newDirection(@);2 c9 Q- y, t9 U( v9 F! ?" @
@.HasOrder := true;% O% M& n9 t7 U! E: o, h! _
end;+ \6 h5 G# M: `( z
end;1 s; z3 T8 m$ D; ]
end; -- of the method# ^: E& o3 t% \1 Q# D/ \
|