/* called by: entrance ctrl of the object 'track'. B3 t- W+ e* R1 N& ?
*/
( A' ]. {& a2 c; f6 Bis
{( S$ F& L7 B1 J: K part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 U9 N3 V/ A5 V. ^8 `
do
% A3 L- w4 Y. d7 b7 t; e Lan := rootfolder.Internal.Tools.AOLlanguage;
9 h1 [% k3 K& Y5 o if current = @.Destination -- else return- ~. C1 H1 |9 A% t4 W
then4 x8 c3 T) l) v' s0 f* v) k
@.Destination := void;1 C! E% P% |2 l- z; j" m- p, l$ n9 t
if @.occupied then' r( D) K" O$ L" n- r
part := @.cont;# ~2 l6 W& e5 W3 Q# e6 ?
@.transpOrder := void;
; H' q! o9 J h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ~' E% Q6 x! o; C* S% R
@,root.eventcontroller.simTime);1 w, O1 p/ A/ S3 {+ s U( Y
@.HasOrder := false; `7 z+ m. J1 n' Z* A, r3 B
@.DrivingHome := true;1 \( ]0 h: p! W4 Z- [1 b, K
rgManager.tryToStartTransOrder;
' U4 x4 R* b$ b$ l7 J3 `2 E, O if @.Destination = void1 t& m* Z/ b# p
then -- no transport order for vehicle @
; k% g0 p0 A. n: K @.Destination :=
/ _, d! {" h6 q" W$ ] R rgManager.nearestFreeStation(@,track.~);0 _+ G" M' V& L
newDirection(@);
( R7 A! ^' q7 y7 K/ m( z) u if @.Destination /= void then
# b$ H/ A1 n! u S- [: B) K8 i c @.Destination.NumReservation :=
3 P! e" D+ r) p @.Destination.NumReservation + 1;
# K) q5 O0 T" \8 U end;% {! U X' k' m! n0 S, G7 V2 x% V
@.CurrIcon := "drivingHome";7 c% [. I! j3 J) I0 n. h
@.DrivingHome := true;
& O7 J- f7 X0 D" x# ^9 l, C. E end;
1 X7 v1 r8 I+ u8 g6 }) v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ b: T. H' g; _2 g% o3 h7 b5 \# b( S part := @.transpOrder;/ V K0 O. G. B; _9 w0 F, L0 ]# O& X% O
part.move(@);-- load part* k3 ^: I& t& p. n
@.CurrIcon := "load";
' Y. k" e% W+ s4 |1 W GlobalDistObj := part.globDestination;
! ]% [' ^. H9 a* v6 i assignLObj := rgmanager.rgAssignL;0 r' c8 J) ]+ P3 w% k
row := assignLObj.getRowNo(GlobalDistObj);/ A( u- M- S' }5 r
if Row = -1 then -- since 70
0 Z1 s* e, q* e) ] if lan=1 then
- U! a( {6 R+ S1 n) O9 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R- s% _( T4 o, e" W( q to_str("in der Andockstation: \"",?.~.name,"\""));1 [- K8 h5 O! s5 p
else( _/ L' B) Q5 c; J: i; q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# S9 T! |/ w6 Q" h8 n/ @, [6 S
to_str("in docking station: \"",?.~.name,"\"")); $ x) n+ i, I1 z
end;
: m' V5 E2 O/ j7 ^% G' Y else
3 R; e) Q) d5 Z: D @.Destination := assignLObj[1,row];
2 v" R/ V, ?8 e9 S; n end; , e' o Z$ C/ z5 o
newDirection(@);1 L2 A4 x4 s2 g/ p; t) |
@.HasOrder := true;
& G* }1 W- `$ m5 N6 A; L end;$ e7 u9 Q! A* b: @- f# f# Y
end;( R. _ y- e) U" i
end; -- of the method; b2 ]) ^! _% N8 I) K& B' x
|