/* called by: entrance ctrl of the object 'track'
% G$ Z! B/ T2 q+ ~8 d. m*/0 g" ^5 u1 o$ p3 ^
is
# \% C! B6 q2 F2 P6 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! M2 b9 t' E' c; k ^do
2 D- I3 y6 e5 T8 H Lan := rootfolder.Internal.Tools.AOLlanguage; u/ x6 k5 i* X7 Y* d l) j+ d
if current = @.Destination -- else return9 ]* ~+ \2 k/ r# X( Q& S
then5 y S! ?( V- v3 B
@.Destination := void;
4 U! h0 i( t7 J/ Q& d if @.occupied then
1 T/ ]* }1 R9 x9 c3 J/ @5 R. O part := @.cont; A8 g' k/ w5 G% ]) f
@.transpOrder := void;
% ^) m& [( W1 t+ k# Q5 H% B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 t/ T ~1 w W x& j @,root.eventcontroller.simTime);
# L. C8 L$ P3 v w6 z- i; f @.HasOrder := false;! [; o& L0 r0 U# s( k4 D/ b
@.DrivingHome := true;2 T- P; b( p/ b2 A3 c+ L
rgManager.tryToStartTransOrder;3 r# `1 f) n1 J. {
if @.Destination = void; F9 K' O* Q- x2 N
then -- no transport order for vehicle @; E. X& y) [# |+ K( E$ c
@.Destination :=
1 G2 y: {2 t, @9 i# E( U rgManager.nearestFreeStation(@,track.~);. `2 S) k. T7 V
newDirection(@); " ]) h. A. f4 Q
if @.Destination /= void then
) ]: O' t. w; x( L& U9 B7 B @.Destination.NumReservation :=5 N* u5 i, V* O/ L7 }. r% s
@.Destination.NumReservation + 1;8 B* n) P! h% r5 m
end;
, e7 ]- e" k9 ?2 ^4 { @.CurrIcon := "drivingHome";
# d) m2 B& b/ M' l, M @.DrivingHome := true;2 A! `% D* i# _
end;- P* F. p. s4 o! ^# A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: _8 O8 }2 q" G, s( v( H$ T j part := @.transpOrder;
' f) \) H( V" r- | part.move(@);-- load part
+ x; q. ?6 a* ^! t% D4 ~) D4 ` @.CurrIcon := "load";) e/ |4 G( L) |$ G7 F% d& Y b
GlobalDistObj := part.globDestination;! O! b, u2 i3 L9 K n1 W
assignLObj := rgmanager.rgAssignL;/ @- g' h1 s0 H
row := assignLObj.getRowNo(GlobalDistObj);
/ g9 t& Q4 i1 T: F% }* }# X5 |& ] if Row = -1 then -- since 70
I( Z" i( p; e p5 f; q if lan=1 then
6 E6 K3 |6 _1 D x1 h+ i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 ?, c) |7 Y& @
to_str("in der Andockstation: \"",?.~.name,"\""));, ~) D" `0 ~" Q
else0 d0 P" j' e# l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 k. O; q4 f* }1 W& L+ T' I' I to_str("in docking station: \"",?.~.name,"\""));
/ ]# v3 j1 M! {0 }" V end;5 N0 V; H, V$ i0 {! Z& S
else2 \4 `5 k. C) ?- D" N; K2 j, f, Q
@.Destination := assignLObj[1,row];
1 V8 h/ s$ ?. g, \, p end; 9 q$ f. j8 {& m6 L" O& P5 D& u. A# U
newDirection(@);
; w5 b. q1 B! ?( Q% e4 g' a: H" y @.HasOrder := true;4 ^6 J/ b/ }( D' O. |
end;
9 m4 b8 F: f9 }+ u7 u5 I& M end;
, T; C) O* v! p9 S/ d; Z& V3 tend; -- of the method
/ u$ S$ I4 Z0 G9 `3 N |