/* called by: entrance ctrl of the object 'track'; K# z- D! I$ [
*/
. s- e* D4 k* Y, m, [3 I7 lis# O# e) R- R5 w3 K) l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 P8 @0 T& H6 H+ Sdo
; D4 I4 ~- }8 r U8 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
4 L" G1 Y3 t1 n if current = @.Destination -- else return
3 w. m; p x* t' O" |% z6 S }' ~ then
% j) i8 o8 n4 f3 G5 H& m2 M6 J3 d Z @.Destination := void;
# z% K( n `+ K if @.occupied then p: F; m. q1 Q R1 H; J
part := @.cont;% N) B0 K$ b8 y' }, x
@.transpOrder := void;% A9 i. n, O( e3 b. ~0 T! S. r4 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, x7 z. |! P6 L- J' E% d
@,root.eventcontroller.simTime);6 `9 [; e$ ?: E3 j# B, A1 L
@.HasOrder := false;/ T6 E- U: y! [
@.DrivingHome := true;( } ]- }' I+ f
rgManager.tryToStartTransOrder;
; @0 c. b0 F) v* o. Q9 _6 C/ ~ if @.Destination = void
1 |: q* [" x- V; {) }& n( c then -- no transport order for vehicle @8 ^8 f+ H& q. b6 e
@.Destination :=- S& H9 q& _ ?4 i. p$ M$ ^" w
rgManager.nearestFreeStation(@,track.~);
# G: O( N9 K/ x* e# T% B# d newDirection(@);
3 p1 g# Q) o" B if @.Destination /= void then
% K& i/ m' A( a% c @.Destination.NumReservation :=- N8 \, N% _, f6 Y
@.Destination.NumReservation + 1;4 O0 |/ b4 g# V2 n% Z, V7 q% B
end;
% Q4 A/ L7 w0 s. y o: h @.CurrIcon := "drivingHome";
+ A. K& f8 O) S* }+ L0 ? @.DrivingHome := true;2 `. V/ o6 i0 s! C. _
end;7 _- ?5 m1 M. i3 F- g7 Y3 U0 U% `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. _- ]% ]" a0 z. F
part := @.transpOrder;
1 s7 E8 Y- H( K" h. o; K part.move(@);-- load part
8 _$ V$ M- E" g, @, O- D' z& o0 t @.CurrIcon := "load";
! F" F5 ~9 M$ m$ I" l) L GlobalDistObj := part.globDestination;
. F9 [' z8 M) g l0 M) n* V assignLObj := rgmanager.rgAssignL;
& y- y6 u4 [! B row := assignLObj.getRowNo(GlobalDistObj);
$ w3 O2 j' ~; D" |* E0 d: } if Row = -1 then -- since 70
7 j( d( T, O# m7 Y3 ?' R if lan=1 then, }7 u' ?4 R$ D3 x( f. o1 b5 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# v0 R. e3 K( |' x# F3 y- J% Z9 g to_str("in der Andockstation: \"",?.~.name,"\""));4 m3 h/ a0 d1 U. l5 ]4 B
else
" u) q! y* l& u) k: ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n5 P& d8 K6 H+ s to_str("in docking station: \"",?.~.name,"\""));
' f- p- ], [4 E end;3 l k4 N- d( w' N% L
else
" a* r2 q8 [3 @) O6 y, } @.Destination := assignLObj[1,row];3 l4 H: W; L( h3 f! C& c
end;
& q( R# R2 J E1 S/ T# h. i. ^ newDirection(@);
6 d y! ^# R9 D3 C" K+ d @.HasOrder := true;
4 [7 T- C& u& m- ? end;
" M, Y/ h) w! Y, c8 H, E4 e+ t6 t end;( K$ G; r) L8 U, D1 ]
end; -- of the method9 P' \- c6 p2 W N
|