/* called by: entrance ctrl of the object 'track'
, ^2 n/ B& I: Q. U( A; E F! {& N*/2 D7 }* d1 ~, X' R3 u- v+ x
is
j& U W6 R* ^8 g0 M9 r8 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 L: w& d- y7 H5 J4 z1 M4 ]8 Ado0 z" m' B0 c; ?$ ?5 x' i M8 l; o
Lan := rootfolder.Internal.Tools.AOLlanguage;" k; P5 X# f1 Y% ]# l% ]% f
if current = @.Destination -- else return
5 D l/ s+ t L% y, @0 w2 x then% ^5 R$ e: `- J" s; w
@.Destination := void;
; \& I) F; m O) {, h _ if @.occupied then; J v7 ^) E* q0 l( W( L, l% G. s
part := @.cont;
|; o6 j& l3 l @.transpOrder := void;
) o% b/ J$ j; ?' e2 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, C) n, V% Y, g7 R" h @,root.eventcontroller.simTime);2 ?, J" r1 l }6 \
@.HasOrder := false;
2 I8 T& m% |; g @.DrivingHome := true;
" J! ~% b0 B7 T j; F rgManager.tryToStartTransOrder;( n$ L# k y5 \ Y8 a
if @.Destination = void
- M! ^+ q( H. |1 d- `9 G' L then -- no transport order for vehicle @0 S& h9 E! ]. E
@.Destination :=
7 P2 f4 u6 k- T* I rgManager.nearestFreeStation(@,track.~);4 R1 p2 `/ c6 V& K9 ?/ u
newDirection(@); , M5 j$ z3 ~+ ~$ B6 Y
if @.Destination /= void then: |/ O$ B7 c( m: g2 W- s
@.Destination.NumReservation :=0 a# C1 p( Q Q
@.Destination.NumReservation + 1;; c0 G Y) c, r/ T+ V: ]$ }
end;
, ?# ? f7 w+ H- \1 l @.CurrIcon := "drivingHome";( s- a1 _4 s. W1 c
@.DrivingHome := true;+ B2 A- V. D6 T$ [: q7 _
end;1 S& r2 B! C4 }8 e; i' P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 |' d+ S( r2 L) P" ^
part := @.transpOrder;
7 L4 j$ b! r, t f: K* D part.move(@);-- load part* h* Y% \+ G" R- Y4 X7 X7 k
@.CurrIcon := "load";
' r% M" I/ ^: ]: g/ v: J' F+ ?4 I2 K GlobalDistObj := part.globDestination;
1 \& L; |$ h4 x assignLObj := rgmanager.rgAssignL;# Q ?4 ]! N1 x1 e+ [! U
row := assignLObj.getRowNo(GlobalDistObj);
' g2 G6 x0 a2 n if Row = -1 then -- since 70- c0 D3 p" M9 G
if lan=1 then% i/ c# S: W O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- H' t% |9 k8 L; ~ to_str("in der Andockstation: \"",?.~.name,"\""));
6 b" x: s" L! }& G& ]- h2 i else+ c* Z, F* Z/ ?( F! T, J) r; [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) j9 l9 K/ M/ f! K7 V to_str("in docking station: \"",?.~.name,"\""));
2 z! C/ ~$ |! r end;
" T. \2 d; @# S$ E3 i8 Q& _ else* f4 Y2 r0 ~4 `6 p/ ?# f4 a
@.Destination := assignLObj[1,row];
0 F+ {; A# r0 Y8 A end; 0 q1 z) j$ H) X3 v4 L% k
newDirection(@);( N) Q7 S, N# l& Q' t V2 p
@.HasOrder := true;0 e3 Y& X- a# S
end;
9 K9 Z% C: K( I% a' j- k0 z- S* V* W end;$ v9 ?( D7 d- ~8 G
end; -- of the method3 q. m& T6 U/ U5 X {. e" i
|