/* called by: entrance ctrl of the object 'track'4 o, k2 }& S% p8 G" r
*/
! K" }' t7 j3 g+ yis
. B1 Q3 l4 z5 n1 x N5 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 P p0 E5 X0 d& v
do
! {" G q: R" Y& k3 Q Lan := rootfolder.Internal.Tools.AOLlanguage;# F+ A5 V) g# f7 @1 m/ v
if current = @.Destination -- else return4 {( b5 X9 ?. S' U# H( x3 ^ a
then
v u& M! M" N3 h- C. K @.Destination := void;1 s$ h! l+ `+ Q, q/ `4 O
if @.occupied then
8 W5 n/ F: j, m6 T9 _ part := @.cont;
# s) t% [: V7 C. e4 \9 @+ o* | @.transpOrder := void;5 D! p' x2 Y9 h' r+ N {# a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& F5 ~( j$ ~# t! h7 G$ I
@,root.eventcontroller.simTime);. F1 ^) B% f# t* j9 E. D, Y) s
@.HasOrder := false;4 ?, ^6 F: ~3 o g4 ?" {9 i
@.DrivingHome := true;
. I6 }+ x) P7 [8 i rgManager.tryToStartTransOrder;! Z5 p. s0 X/ E2 z. r) Z- F
if @.Destination = void
, G) Y+ R3 K( [" J, V( k& D then -- no transport order for vehicle @' S+ s: b0 X& E. c1 l
@.Destination :=- H/ s! }1 S. Q5 h" f
rgManager.nearestFreeStation(@,track.~);* ~2 W6 m; X" K/ P, R& k+ t
newDirection(@); / R2 d) x. _& Y6 `. h
if @.Destination /= void then
% V- c5 |7 N! i& U @.Destination.NumReservation :=
- j0 j/ g( t* p8 V/ u6 k4 F @.Destination.NumReservation + 1;8 B% x& U# R ^" t7 {4 N
end;4 U- ?& x* f Y8 W M3 G9 V
@.CurrIcon := "drivingHome";+ V2 }4 _; v) I# y8 y
@.DrivingHome := true;
- P( n5 p" M( {' T* O, u# X: b, [ end;
( H: ~$ v" J v! n+ D# C. g0 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) _* h8 D, E X3 z+ I part := @.transpOrder;7 O) E2 e) N3 I0 P' n
part.move(@);-- load part( z; S, ^2 S5 O9 [) m+ I
@.CurrIcon := "load";
! j! S" O- A5 r$ K7 C* b' W GlobalDistObj := part.globDestination;' S# H" {2 c1 d# @2 J6 H' W0 z
assignLObj := rgmanager.rgAssignL;
# U: X+ q& M: Q, }1 V3 M( A% n6 P row := assignLObj.getRowNo(GlobalDistObj);, u9 k) M1 D4 {! D% P* ^3 G& @
if Row = -1 then -- since 70
( H' R, y* V5 M0 @, E9 l# f" g if lan=1 then0 q9 c7 \, h% C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), k+ I+ v u, r
to_str("in der Andockstation: \"",?.~.name,"\""));, K( N2 c# \( H) P
else, a& z [; B1 ~2 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' f7 b# o$ y$ z+ N to_str("in docking station: \"",?.~.name,"\""));
) e' X, `, M G Y end;+ X# S9 ?$ `2 d( a3 H$ X
else2 V( s0 X# O- G7 _$ u
@.Destination := assignLObj[1,row];* n- D L0 u$ H) D
end;
b+ [$ g; ?0 v( u newDirection(@);
g1 w3 B6 g8 a4 h% | @.HasOrder := true;" [5 { Y) i; ]9 s d
end;# K, Y1 x6 w3 Q6 V, q+ M
end;
9 m2 Z/ O B- `( j' G) f9 }8 Bend; -- of the method
( d% J. z7 j9 X: w- |1 N3 P. `6 O2 ^& ` |