/* called by: entrance ctrl of the object 'track'! M( h% x6 H, ]2 R8 a/ d) k
*/
7 M; F/ e- I( O% V* K5 Jis
7 m0 U/ g: c; Y0 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 D& A4 D+ j& }) R
do! b" I9 L# p4 F$ E4 F) o
Lan := rootfolder.Internal.Tools.AOLlanguage;% o, w; x# w0 X7 M
if current = @.Destination -- else return
! I$ P6 ^3 b$ k# C7 r5 Q then, ]6 N3 I, S4 r2 }& ^$ v y9 ?: L
@.Destination := void;
2 d; c& ?& y) v1 V- c if @.occupied then
& z1 R* t: e7 k, U( J0 x; |) h& h part := @.cont;
! K5 x) m& H9 O @.transpOrder := void;
( y5 w( n- L% G6 c4 p! @* z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, N3 Z6 [) \8 }1 U9 t, n
@,root.eventcontroller.simTime);
8 {% J5 ]2 o, K2 G @.HasOrder := false;
' e, f+ n e ]8 z @.DrivingHome := true;
6 |4 c8 s. Y3 O6 R: K' X o rgManager.tryToStartTransOrder;
8 l8 Y: b: N; q0 n if @.Destination = void! f; y- p5 t" ~7 u3 w
then -- no transport order for vehicle @
/ F( r3 r8 o3 P& B+ G @.Destination :=7 }* e! O. N3 n
rgManager.nearestFreeStation(@,track.~);1 d/ A0 p3 A. ^% J5 K. J. k4 h# ~
newDirection(@); ( b }& H/ e6 E. o! E
if @.Destination /= void then! G6 \9 \, s8 g, I4 L6 _( i) e
@.Destination.NumReservation :=
8 a- g/ I" a; B1 y @.Destination.NumReservation + 1;, ]: U) G' U5 i+ H7 O" G
end;) r) z% U1 R5 R8 ^
@.CurrIcon := "drivingHome";# n! ^- Q: M3 c* Q* i& H2 `) A
@.DrivingHome := true;
% H3 D0 z' p5 W: J r end;3 k% | Z, i& e; ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ i- X" A$ z9 e8 _ part := @.transpOrder;4 A& P) P) d/ u) }1 A1 D7 F
part.move(@);-- load part' N* y& V8 p: q1 f3 w
@.CurrIcon := "load";! G5 @( j1 k9 y, j; |
GlobalDistObj := part.globDestination;8 {# g& e0 t+ e, G5 a9 l- L7 J
assignLObj := rgmanager.rgAssignL;1 H5 R& b+ W. f& y/ F6 R
row := assignLObj.getRowNo(GlobalDistObj);9 H9 a' s( m+ m- y; a8 u; W
if Row = -1 then -- since 70% A0 B( c9 Z6 d! ^9 P7 A/ Z9 M! k
if lan=1 then4 b+ F3 V5 P1 W/ p: j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* o5 e/ M% u5 ^9 |3 t
to_str("in der Andockstation: \"",?.~.name,"\""));3 D6 i* ]/ m! L( ]
else
# ?( e7 X0 B7 F( e. a4 C; ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 R2 a6 l+ f) i& t4 o* j to_str("in docking station: \"",?.~.name,"\"")); ; t4 {5 e+ z8 C' O( W! ]3 |7 V/ r
end;/ d& t8 @( V, D3 Y7 E% C6 K
else! u' F6 u w# v3 G
@.Destination := assignLObj[1,row];
* o9 `. K2 u p, K- i: v end; ) @, R" k% ~6 V3 H0 E) _5 _6 h
newDirection(@);
( E: S; H, P. m: H* O) x2 w' G" K @.HasOrder := true;
2 }0 r6 q# [7 i' o. j% L+ k end;
: n& ` F( U! Z3 K end;. ]9 T- a' k+ f/ X+ Q- x* p3 @
end; -- of the method Q' G0 l, Q7 ]& X" D. E: A
|