/* called by: entrance ctrl of the object 'track'
- l( H$ c9 I" Q2 o1 F*/8 L! ? t" j6 q' f# v2 U
is7 d! C) ]5 W5 F' A+ w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' h5 w v% F2 u- u' _/ ldo
# \) X, v0 @ P ?4 n; S ?* w Lan := rootfolder.Internal.Tools.AOLlanguage;) j0 Y# @' q7 Q0 s1 b
if current = @.Destination -- else return
8 w' B2 `; k2 w' |4 h% p4 n$ J, a then
) ^, i% X D# G; c" _% x. v5 l& l @.Destination := void;( n+ D( a2 t7 I8 I- H6 i A N
if @.occupied then
" t; K+ o2 b8 ]$ \8 ?8 k part := @.cont;
3 t/ Y; g; |& ~) I2 N @.transpOrder := void;
! ?9 p+ @& w- @, h+ c0 R K+ @: h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 c1 M3 D) Z* C7 j, t
@,root.eventcontroller.simTime);
1 n: N2 _2 ~ l @.HasOrder := false;+ n- n' ~- G4 p3 o: {- Z! W
@.DrivingHome := true;
5 K& F6 r _; L1 y( y rgManager.tryToStartTransOrder;& i$ q* V8 \% M6 `9 H: `7 z
if @.Destination = void) ~; V0 ?# l: d; x6 }& n. C
then -- no transport order for vehicle @) W$ d, J7 r, Y. g4 I# b
@.Destination :=- @# Y7 T% B( l7 U2 O
rgManager.nearestFreeStation(@,track.~);7 {, G8 C3 {2 R4 J8 X
newDirection(@); T/ f: L" H2 y0 B& h$ m! [
if @.Destination /= void then
& X4 K: ?" m v: x @.Destination.NumReservation :=- M, D, K s X9 m! ]% ~5 X9 a2 B
@.Destination.NumReservation + 1;
2 c/ U8 Z7 l( [1 I } end;
0 x1 F& I' Y- ` @.CurrIcon := "drivingHome";* c3 s; s; N) ^9 I6 U2 f1 }( G
@.DrivingHome := true;2 E+ s! ~ W. m& I5 i0 f0 ^ u& E8 ]
end;5 ?+ h u% c0 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' b: Y% x, v o! z8 g/ O; M" U
part := @.transpOrder;" P3 Z9 z* d7 o9 D6 T; p
part.move(@);-- load part
, |& Q4 y8 ^3 P @.CurrIcon := "load";8 C# A) z2 b2 I" \2 S. a5 Q
GlobalDistObj := part.globDestination;
; U" ?! ]6 i" t5 T( K assignLObj := rgmanager.rgAssignL;
2 k+ z) D; G& A1 v row := assignLObj.getRowNo(GlobalDistObj);# O6 K5 O" n( z, Q/ H; w
if Row = -1 then -- since 70: J4 B6 R4 _5 w8 I1 \& A& a
if lan=1 then
4 R v2 a: Y- A8 ? j, y, a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* `3 I1 @7 g8 _
to_str("in der Andockstation: \"",?.~.name,"\""));* a5 {1 ]1 o2 k# F; e8 S& M
else& F2 T" ]5 E, d0 r1 v3 q( }( S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 ~; \) h( `+ g* F) H$ a3 S7 T
to_str("in docking station: \"",?.~.name,"\""));
4 G- i N! [$ V0 f& y, a. N end;% Y2 a% @9 q6 N9 g0 u
else) I' G8 p: g' q" L
@.Destination := assignLObj[1,row];" N+ p1 g/ N' o- f# h. s& Q
end;
7 C0 ?- k/ C S7 h! z. X newDirection(@);
% W p/ b4 n, z7 ~3 Y y @.HasOrder := true;) P) Y* Z2 ~4 [2 x- y0 M# C, R
end;! j, c4 d6 f: P* S* H6 i' }' x
end;0 z3 w$ M( a1 d
end; -- of the method @9 y! O& i) j) K/ D( w' _- e
|