/* called by: entrance ctrl of the object 'track'
. T! P2 X# Z8 B& d*/2 h. t- d" C/ Q- F
is/ C) j( B6 B9 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ I7 m0 [9 N3 W) Ldo0 ]' t, H& o( ]8 d& A
Lan := rootfolder.Internal.Tools.AOLlanguage;
' z; W& q/ P5 x' p# r# |- H if current = @.Destination -- else return
6 H0 _" r2 W* o7 T# E- H then
# L% Y8 z! e, }3 ~, a @.Destination := void;& L) y3 E5 @/ T7 T: d
if @.occupied then
1 t- D' w1 a0 j! t, t% K) D part := @.cont;0 D2 S( l* V- O4 H
@.transpOrder := void;
' \0 c/ R( t: f+ \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& q) }7 P2 w0 o8 d' ?, M3 Q i @,root.eventcontroller.simTime);$ i* n2 x E z" T# x$ r" U5 N! N
@.HasOrder := false;( l$ ^+ p$ o$ K
@.DrivingHome := true;
+ K# u9 u ^. S; N3 c0 H rgManager.tryToStartTransOrder;
- A& o _. P/ g9 C* b5 N if @.Destination = void
% `: l ` R( W& w! ]7 m: z) z4 _ then -- no transport order for vehicle @
; ~3 H7 ~, g- }+ [ @.Destination :=0 P9 g h: G" b% ~/ K3 N$ v8 M" t3 S
rgManager.nearestFreeStation(@,track.~);
! u9 I! X3 A X' p& v+ e j/ }+ K newDirection(@);
r+ Q7 D( \" A/ W: W( G1 g if @.Destination /= void then
$ @0 m9 q5 u3 @. h @.Destination.NumReservation :=
5 b% @1 C1 B! j& B @.Destination.NumReservation + 1;
* N. P) [# v3 N1 U. ~2 C. s% | end;
. e$ u4 O; Q( R, H0 d2 d, ]3 c7 r @.CurrIcon := "drivingHome";
, c0 H. v; C* N/ f$ r @.DrivingHome := true;3 D# Q2 S+ k S3 F
end;
3 `7 l! p. n. @+ y9 d# J else -- the vehicle @ is empty, both vehicle and part are in the same dock station( P) }" b6 T7 L: Q# o
part := @.transpOrder;6 I% D( n8 U) G2 h1 P
part.move(@);-- load part# |1 b1 A2 O- y6 `8 p$ B8 i
@.CurrIcon := "load";1 Q! {( Z* E" F O1 D0 O
GlobalDistObj := part.globDestination;) S, E! s. {* z1 k9 L8 d
assignLObj := rgmanager.rgAssignL;
/ l; L+ v* |* a1 ^9 q: V row := assignLObj.getRowNo(GlobalDistObj);
" j* h1 ]' F( n+ R5 z- G& n- i if Row = -1 then -- since 700 e) I0 @3 e; J+ K s3 |6 O' d
if lan=1 then- q+ m1 y; r+ R3 _- p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, g J) h; N9 i) y) O to_str("in der Andockstation: \"",?.~.name,"\""));1 m; ^2 N+ z6 @! ]1 R: O8 k1 Y
else5 f: l; i# U# y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% w7 x6 A2 [: w
to_str("in docking station: \"",?.~.name,"\"")); # n# W- h! [2 B: ^. z5 e
end;' f9 V8 z4 ~( m) L+ y
else% W4 a" C5 h+ n1 O- U+ {
@.Destination := assignLObj[1,row];1 d' V# n' x m$ l3 G
end;
$ R R5 {& ?$ E& g8 j' V newDirection(@);! B6 j8 J* d+ a4 D6 t( G2 e9 f
@.HasOrder := true;7 x4 d$ O% x2 ]; j
end;8 l0 b4 L, v7 f$ R
end;; N- z* O) Y Y$ e8 M# L6 Z
end; -- of the method, B6 u/ E' Z$ E X* [1 t0 n# q
|