/* called by: entrance ctrl of the object 'track'$ y; ]: d* F9 a. u
*/+ w1 V6 {' j) M9 f5 b# N+ y
is8 k( |* ~% V( G' T8 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( X3 g c, V& d9 B7 S; Cdo0 m5 r* ?4 a9 p
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 w% w) l% v. W. \. P+ w( R9 h5 L if current = @.Destination -- else return0 u0 M6 z5 [ a
then/ X& s3 g- Y! y1 ^/ ?; U
@.Destination := void;! L. h9 C4 ^8 f# @6 Y+ L7 l8 J
if @.occupied then5 Q: w6 Q! Z$ A p' c
part := @.cont;
. U" M$ w) _ k* D0 ~ @.transpOrder := void;7 b8 r( I5 ~6 p5 E" j- W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! m2 g: N8 q, \ b
@,root.eventcontroller.simTime);
9 X3 K# B$ B7 J: U% g! ^# y @.HasOrder := false;5 `3 O0 G0 M6 P4 X0 B; c
@.DrivingHome := true;
& i" l O8 r/ e0 N rgManager.tryToStartTransOrder;% c1 J! x, v* q7 h) `
if @.Destination = void$ t I- ~$ S* I, H' ~
then -- no transport order for vehicle @
% y9 J0 w$ \/ L @.Destination :=6 r7 H/ T# e% }' H3 _; g
rgManager.nearestFreeStation(@,track.~);
7 S7 b# u1 h1 g9 _( d! ]* t6 M newDirection(@);
Q1 x3 R% e6 w- M0 B( T, d8 ] if @.Destination /= void then
. d/ H+ W/ E" O3 H3 ~, d2 Z @.Destination.NumReservation :=6 w0 R- w( P0 B1 j0 K3 b* L* m
@.Destination.NumReservation + 1;* U3 P! s9 E" ~# _, x
end;8 ^! D, m2 b* Q* I/ K& i
@.CurrIcon := "drivingHome";
/ i/ ?1 J5 F" N1 ^1 z6 D1 O4 r/ }/ r; I @.DrivingHome := true;* ?1 S u% t* G
end;, B, N' J+ W f; \, X3 X8 ^: s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% A; Z7 E( { a {0 E4 b part := @.transpOrder;" X) Q: f/ Z$ k6 F0 S6 `
part.move(@);-- load part( f, K0 ?4 j% a. L [9 `
@.CurrIcon := "load";
: s$ ]7 ]5 c B) d8 a GlobalDistObj := part.globDestination;
. Y9 Y' t! B2 n0 j assignLObj := rgmanager.rgAssignL;: a, ?8 W/ ~0 c
row := assignLObj.getRowNo(GlobalDistObj);
' T& a! i+ ~* C( k M if Row = -1 then -- since 70+ Y/ r! Y; J, t' W
if lan=1 then
' }2 A$ i. q9 [8 ?8 f8 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 V% b8 m$ M6 ?) g to_str("in der Andockstation: \"",?.~.name,"\""));
, |9 e2 S7 ^; F: J0 J) [ else
0 _ X8 b5 g) j5 e6 {9 X- u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% i" j0 e; x4 q5 f to_str("in docking station: \"",?.~.name,"\""));
3 c1 w" ?% B& N. s end;
, E$ r3 f9 \) J$ ~4 f else
( @2 [/ x7 m1 g0 C @.Destination := assignLObj[1,row];
. F1 F3 G$ W8 T) S; w- o/ v end;
$ T% h" U% t: z1 b) { newDirection(@);% Z9 P4 t: t9 d
@.HasOrder := true;
7 l) Y T* k4 Y! C" h end;
4 ~& Q, L, B% P6 j' w/ m* ]/ _ end;- z9 N- J# p3 u( V, `: S; c
end; -- of the method
# h* w+ q0 r, S0 D9 e; K5 J* k |