/* called by: entrance ctrl of the object 'track'
% I% h% @1 @0 X6 l8 p# e*/
* u/ T: u+ a( N! N! Z: A6 c: yis+ Q* t4 p7 ~+ M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) ]5 g8 r6 ?4 }4 d3 o& Z- q
do
1 g/ O& b& c1 c3 J$ _ Lan := rootfolder.Internal.Tools.AOLlanguage;
" i; z! \1 m3 l& G if current = @.Destination -- else return
) S5 Q9 Z: F5 y) N then. m2 M7 ~3 w+ F$ Y& @, V
@.Destination := void;
: j/ m) O7 f/ q( e if @.occupied then
' r) N ~$ N6 ]) i8 B h& w6 i part := @.cont;7 ]0 ]- D5 _, W* d1 }" ~2 X
@.transpOrder := void;7 h7 O, k: b; E1 h9 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: o$ R' }( O( P ~ @,root.eventcontroller.simTime);" e0 _+ T. j) W3 e( i5 h* _$ Z9 G+ m
@.HasOrder := false;
. Z# Z2 i$ [# U" Y4 E5 _ @.DrivingHome := true;
$ k. B( T2 L7 P& X0 |9 u rgManager.tryToStartTransOrder;5 [! x* g% L% m! M+ y3 K0 s
if @.Destination = void
0 |# ^) s. k& N5 V: a then -- no transport order for vehicle @- V) h, \0 I a+ M
@.Destination :=+ j# N6 O: o' o8 c4 s% i! G
rgManager.nearestFreeStation(@,track.~);
# G( Q6 g9 M. K/ S newDirection(@);
$ w1 Q B/ y8 Z: V1 W; C if @.Destination /= void then
1 z8 f6 Z- T6 R1 N- h @.Destination.NumReservation :=
2 j' L8 I7 e. |* m& w, i @.Destination.NumReservation + 1;
" m V% X3 g" p) o end; m! c6 k, I% t" A/ U1 i1 j5 C- ?8 X
@.CurrIcon := "drivingHome";
& O+ @& ^0 F, `+ n" o$ I' O @.DrivingHome := true;
0 }0 a/ F* q7 W+ e9 e" a end;
3 M2 Y7 M. k/ q& ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 s6 D5 }$ L: H7 {, k$ G part := @.transpOrder;
" M+ X4 u- c [ part.move(@);-- load part: R& P% b1 L6 x3 t2 D
@.CurrIcon := "load";$ n" t+ T4 [# j7 v7 u9 b0 S) d) k) w+ D
GlobalDistObj := part.globDestination;( A( j1 U: P+ l
assignLObj := rgmanager.rgAssignL;2 I/ Y8 R$ {1 l5 H; i4 C4 Q
row := assignLObj.getRowNo(GlobalDistObj);. M* {. a1 {( h& i& M
if Row = -1 then -- since 70
/ |& h8 D9 Q9 R2 p, y6 v2 ^ if lan=1 then
M `0 i4 @! [3 `; S; p# Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' V: f/ Q, n% w& m* h to_str("in der Andockstation: \"",?.~.name,"\"")); z8 i' a: h5 h! f
else5 @7 x$ {: L- B9 X( ^% e$ m) m
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," k( l; g- v4 {- ]
to_str("in docking station: \"",?.~.name,"\"")); 1 R. `$ n, `7 ]/ }6 z9 ?( j. s# u
end;
8 p& p6 c s% z! @) O/ {, u) b else* A b! ?. x; c: ^( I
@.Destination := assignLObj[1,row]; N8 V4 ]+ `" L" p
end;
! b v. m: Y+ S! c5 q' L newDirection(@);
- f0 P5 \, p5 t3 W0 h" Z% o8 v @.HasOrder := true;
! b) ]- P: X7 u9 r6 D+ ~) R+ [ end;
, t7 _ m5 z' v2 J end;, S; _# f& V6 t |& R4 H
end; -- of the method% g1 R% w! a0 _( K5 v
|