/* called by: entrance ctrl of the object 'track'7 N( i2 e+ V0 U8 k
*/
: H. y7 ]5 g$ t9 e. k' g4 q2 dis: y h. ~: W; |/ |. ~, A1 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! d0 X: Q# w8 n4 L
do! N' Z: t8 v+ R& X) ]5 Z' }
Lan := rootfolder.Internal.Tools.AOLlanguage;9 [% d0 r- j+ O' `8 P. O$ K
if current = @.Destination -- else return1 n* U/ \$ }) I7 Q9 D; Z
then
1 e( M! F( ?2 M: l @.Destination := void;
2 F" r. p" b* R1 j( K if @.occupied then; A. m& P+ q' j2 Y N' x! g: [
part := @.cont;
7 t8 o+ C8 W! c9 L, f @.transpOrder := void;. m+ C* B5 U; i* e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( v4 Q2 F6 O( R9 v5 c q @,root.eventcontroller.simTime);
& N: |) T! | f Y% t$ C6 Z @.HasOrder := false;
# X0 J& }6 g) K$ Y M* u) \ @.DrivingHome := true;
5 r$ h# V! L6 l2 V rgManager.tryToStartTransOrder;6 }+ a6 C* I# Q1 T6 M) ?
if @.Destination = void4 R9 e( j* a+ R# P* X; q6 n
then -- no transport order for vehicle @
" A& R& D3 p( E4 j/ M @.Destination :=
2 U( \5 Q# d1 U) B; u rgManager.nearestFreeStation(@,track.~);$ u+ ?; S! ]" |
newDirection(@);
8 t! c) r; _& P+ f; ~% U if @.Destination /= void then
6 P3 F- v" Q. y) g2 ~3 ]. l( v% W @.Destination.NumReservation :=2 i; z( V6 V! g: {0 p: K
@.Destination.NumReservation + 1;
; i- ^& L7 J/ U& J j4 D* J end;
; E1 o8 P- A5 E @.CurrIcon := "drivingHome";
3 M. N! b% g% c( B; O @.DrivingHome := true;3 y1 c3 C/ F) ~1 n4 P
end;
" z( c8 }, n! Q! k. Z& P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 i: C. O. O# | part := @.transpOrder;/ V: q4 v3 Y/ ^
part.move(@);-- load part* I f8 m1 ?' c2 m( j: q
@.CurrIcon := "load"; X% l% d1 D Q$ E% c# [$ U5 Q
GlobalDistObj := part.globDestination;% \& Z( w) e* c+ J& t
assignLObj := rgmanager.rgAssignL;
) _9 b1 v4 y+ t row := assignLObj.getRowNo(GlobalDistObj);
% e1 d Q# A' F# i if Row = -1 then -- since 70
, U8 E5 S( d9 s. k" @4 j& x8 D if lan=1 then
+ k$ p% [( _/ i: |! Z) | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), k; A* X8 V3 g8 L' G
to_str("in der Andockstation: \"",?.~.name,"\""));
3 b& A* }0 d- E else! N2 y) s9 a: N: m4 y2 I1 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' b! `4 q7 w4 L4 X+ S$ z" e9 O
to_str("in docking station: \"",?.~.name,"\""));
}% o' J4 m8 {- M( D4 P" \& H) o1 D. E end;
) S2 X: ? U5 P) T' H else
# z: l& ~! E6 C; l2 X4 ` @.Destination := assignLObj[1,row];+ k4 V9 ]7 o" n; ^# c& m, y) z
end;
3 F1 _% I8 G# P& E) i% ~) E newDirection(@);4 H& q" O1 ?5 p4 l6 i7 N9 u
@.HasOrder := true;
" E% [2 O3 z) B end;
) Q: `2 k- Q5 Y& ^ end;$ y% |4 @8 a8 {7 h2 S
end; -- of the method
3 |3 B5 F O/ ]5 |: n. }+ h8 v. L6 u |