/* called by: entrance ctrl of the object 'track'
! X# s6 }/ q) g4 c/ x; q& E/ m& x*/) H, Y4 W/ F7 g
is6 W( U4 m5 {; l. I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: I+ i' r/ P jdo
- G: V; ]6 t) l2 J; Y Lan := rootfolder.Internal.Tools.AOLlanguage;5 F0 s: z0 y7 R4 c2 |5 p
if current = @.Destination -- else return/ | ? N( D; y0 Q$ ^
then
# |. p7 D9 W/ ?5 _/ U" I5 B @.Destination := void;
2 a* a V& I: z h9 h0 @ if @.occupied then
% I& L7 A8 i8 a$ [ b8 W( I part := @.cont;
% k5 O9 o1 i# a, w9 H @.transpOrder := void;2 J" P" Q6 h3 d( r9 J# S' I: n/ O& B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 D$ A$ _+ @1 c9 H7 S" M% F0 Q! b8 ~
@,root.eventcontroller.simTime);
; P O: h5 ~$ E" s$ `% H$ r& N! f @.HasOrder := false;8 x+ O& F* \# H1 O4 X0 C. P
@.DrivingHome := true;* k& I% N0 Z* |9 x" A! I+ ~6 e
rgManager.tryToStartTransOrder;& k+ i. r* H! F+ k4 f/ N. b4 F
if @.Destination = void
" x$ C6 M6 Y) s* Q0 r- ^4 F" L) k then -- no transport order for vehicle @4 d3 c; |1 g, l; W
@.Destination :=
/ J( l8 B( m9 Z0 ^* \: e rgManager.nearestFreeStation(@,track.~);3 i$ j2 y+ }. B {/ S5 _$ |
newDirection(@);
' } b1 P- u, \! V if @.Destination /= void then
( j. y; m' Z* _% J) v- X+ j( c. k @.Destination.NumReservation :=
0 [$ { t- W( F+ T8 J, @2 D" v @.Destination.NumReservation + 1;
5 B$ _0 U( j* i) R7 m6 c end;
0 F7 y; y/ K2 |9 y# F# W @.CurrIcon := "drivingHome";
2 n5 t5 t9 j, H7 ` @.DrivingHome := true;
7 S- D* N, ~, V! Y. u& w' L( t end;
$ a0 C5 l( y. E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% v- w* V* g& \$ B+ t& s part := @.transpOrder;
( d2 F' b/ V; g- { n part.move(@);-- load part* n+ e8 D* y$ M4 f- [7 `# G# K |
@.CurrIcon := "load";
1 }( q. h3 D3 ?* q, y0 b2 S9 i! ]5 h GlobalDistObj := part.globDestination;; F& y9 N R2 e! g% a
assignLObj := rgmanager.rgAssignL;
2 s K: B9 n0 K a9 ]! Y C row := assignLObj.getRowNo(GlobalDistObj);
- Z9 ^% j1 e6 Z* i- H if Row = -1 then -- since 705 V3 [( Q1 ?; R4 P. I+ d
if lan=1 then3 z$ Z9 s) P" A3 H5 T7 w# g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- f2 e, v4 E# K8 Y- ~
to_str("in der Andockstation: \"",?.~.name,"\""));* R/ x0 s7 g: y
else
5 G$ [6 ?8 ~8 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ v& T5 ^0 i6 _) R9 Q) I& B to_str("in docking station: \"",?.~.name,"\""));
3 j& v- P# F7 N7 S5 N* C: j/ _ w end;
( Q* x( A3 k+ P else' c3 ?5 d' s5 J
@.Destination := assignLObj[1,row];, G! R& ?& O2 V
end;
7 F3 z. r* ~* V: G, R: E8 N newDirection(@);3 C5 k) T6 t5 F
@.HasOrder := true;" l+ v+ k1 }- Z- T c9 P
end;: j! Y# V% J$ E' r+ c; {/ l& L
end;! ?) U5 A' T/ h& q9 x+ o
end; -- of the method
4 J4 x- s" G1 N) f' \& h. [ m7 G1 p |