|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.project.EnvironmentalConstraints
public class EnvironmentalConstraints
Scheduling constraints related to environmental conditions.
An instance of this object is held by a SchedulingBlock
.
Version Info:
$Revision: 1915 $ |
$Date: 2009-01-21 16:15:07 -0700 (Wed, 21 Jan 2009) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
EnvironmentalConstraints()
Creates a new container of environmental scheduling constraints. |
Method Summary | |
---|---|
EnvironmentalConstraints |
clone()
Returns a copy of these constraints. |
boolean |
equals(Object o)
Returns true if o is equal to these constraints. |
boolean |
getAvoidSunrise()
Returns true if the scheduling block holding this object should not be scheduled near sunrise. |
boolean |
getAvoidSunset()
Returns true if the scheduling block holding this object should not be scheduled near sunset. |
List<SchedulingConstraint> |
getBlockingConstraints(LinearVelocity windSpeed,
Angle api,
Angle ionosphericPhase,
Angle solarSeparation,
boolean nearSunrise,
boolean nearSunset)
Returns a list of all the constraints that should block scheduling based on the given conditions. |
Angle |
getMaxAllowableApi()
Returns the maximum allowable atmospheric (tropospheric) phase. |
Angle |
getMaxAllowableIonospherePhase()
Returns the maximum allowable ionospheric phase. |
double |
getMaxAllowableOpacity()
Returns the maximum allowable atmospheric opacity. |
LinearVelocity |
getMaxAllowableWindSpeed()
Returns the maximum allowable wind speed. |
Angle |
getMinAllowableElevation()
Returns the minimum allowable elevation for an observed source. |
Angle |
getMinAllowableSolarSeparation()
Returns the minimum allowable separation between the observed source and the sun. |
static Angle |
getSuggestedMinimumSolarSeparation(ReceiverBand receiver,
TelescopeConfiguration arrayConfig)
Returns the suggested minimum angular separation between a target source and the sun. |
boolean |
hasApiConstraint()
Returns false if the API constraint is so relaxed as to practically not exist. |
boolean |
hasBlockingConstraints(LinearVelocity windSpeed,
Angle api,
Angle ionosphericPhase,
Angle solarSeparation,
boolean nearSunrise,
boolean nearSunset)
Returns true if any of the given conditions are outside of this set of constraints. |
int |
hashCode()
Returns a hash code value for these constraints. |
boolean |
hasIonosphereConstraint()
Returns false if the ionospheric phase constraint is so relaxed as to practically not exist. |
boolean |
hasMinimumElevationConstraint()
Always returns true because the antennas themselves may point only so low. |
boolean |
hasOpacityConstraint()
Returns false if the opacity constraint is so relaxed as to practically not exist. |
boolean |
hasSolarSeparationConstraint()
Returns false if the solar separation constraint is so relaxed as to practically not exist. |
boolean |
hasWindSpeedConstraint()
Returns false if the wind speed constraint is so relaxed as to practically not exist. |
void |
reset()
Puts the constraints held by this object back to their default values. |
void |
resetAvoidSunrise()
Puts the avoidSunrise constraint back to its default value. |
void |
resetAvoidSunset()
Puts the avoidSunset constraint back to its default value. |
void |
resetMaxAllowableApi()
Puts the maxAllowableApi constraint back to its default value. |
void |
resetMaxAllowableIonospherePhase()
Puts the maxAllowableIonospherePhase constraint back to its default value. |
void |
resetMaxAllowableOpacity()
Puts the maxAllowableOpacity constraint back to its default value. |
void |
resetMaxAllowableWindSpeed()
Puts the maxAllowableWindSpeed constraint back to its default value. |
void |
resetMinAllowableElevation()
Puts the minAllowableElevation constraint back to its default value. |
void |
resetMinAllowableSolarSeparation()
Puts the minAllowableSolarSeparation constraint back to its default value. |
void |
setAvoidSunrise(boolean avoid)
Used to specify whether or not the scheduling block holding this object should avoid execution near sunrise. |
void |
setAvoidSunriseAndSunset(boolean avoid)
A convenience method for avoiding both sunrise and sunset. |
void |
setAvoidSunset(boolean avoid)
Used to specify whether or not the scheduling block holding this object should avoid execution near sunset. |
void |
setMaxAllowableOpacity(double newMax)
Sets the maximum allowable atmospheric opacity. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnvironmentalConstraints()
Method Detail |
---|
public void reset()
public LinearVelocity getMaxAllowableWindSpeed()
The velocity returned is the one held internally by this object, so changes made to it will be reflected herein.
hasWindSpeedConstraint()
,
resetMaxAllowableWindSpeed()
public final void resetMaxAllowableWindSpeed()
getMaxAllowableWindSpeed()
,
hasWindSpeedConstraint()
public boolean hasWindSpeedConstraint()
getMaxAllowableWindSpeed()
; if wind speed is not
a concern, that method will return a value sufficiently high that it
will not constrain scheduling.
getMaxAllowableWindSpeed()
,
resetMaxAllowableWindSpeed()
public Angle getMaxAllowableApi()
The angle returned is the one held internally by this object, so changes made to it will be reflected herein.
hasApiConstraint()
,
resetMaxAllowableApi()
public final void resetMaxAllowableApi()
hasApiConstraint()
returning false.
getMaxAllowableApi()
,
hasApiConstraint()
public boolean hasApiConstraint()
getMaxAllowableApi()
; if API is not
a concern, that method will return a value sufficiently high that it
will not constrain scheduling.
getMaxAllowableApi()
,
resetMaxAllowableApi()
public Angle getMaxAllowableIonospherePhase()
The angle returned is the one held internally by this object, so changes made to it will be reflected herein.
hasIonosphereConstraint()
,
resetMaxAllowableIonospherePhase()
public final void resetMaxAllowableIonospherePhase()
hasIonosphereConstraint()
returning false.
getMaxAllowableIonospherePhase()
,
hasIonosphereConstraint()
public boolean hasIonosphereConstraint()
getMaxAllowableIonospherePhase()
; if ionospheric phase is not
a concern, that method will return a value sufficiently high that it
will not constrain scheduling.
getMaxAllowableIonospherePhase()
,
resetMaxAllowableIonospherePhase()
public Angle getMinAllowableSolarSeparation()
The angle returned is the one held internally by this object, so changes made to it will be reflected herein.
hasSolarSeparationConstraint()
,
resetMinAllowableSolarSeparation()
public final void resetMinAllowableSolarSeparation()
getMinAllowableSolarSeparation()
,
hasSolarSeparationConstraint()
public boolean hasSolarSeparationConstraint()
getMinAllowableSolarSeparation()
; if solar separation is not
a concern, that method will return a value sufficiently low that it
will not constrain scheduling.
getMinAllowableSolarSeparation()
,
resetMinAllowableSolarSeparation()
public Angle getMinAllowableElevation()
The angle returned is the one held internally by this object, so changes made to it will be reflected herein.
hasSolarSeparationConstraint()
,
resetMinAllowableSolarSeparation()
public final void resetMinAllowableElevation()
getMinAllowableSolarSeparation()
,
hasSolarSeparationConstraint()
public boolean hasMinimumElevationConstraint()
getMinAllowableElevation()
,
resetMinAllowableElevation()
public double getMaxAllowableOpacity()
hasOpacityConstraint()
,
resetMaxAllowableOpacity()
,
setMaxAllowableOpacity(double)
public void setMaxAllowableOpacity(double newMax)
newMax
- the maximum allowable atmospheric opacity.getMaxAllowableOpacity()
,
hasOpacityConstraint()
,
resetMaxAllowableOpacity()
public void resetMaxAllowableOpacity()
getMaxAllowableOpacity()
,
hasOpacityConstraint()
,
setMaxAllowableOpacity(double)
public boolean hasOpacityConstraint()
getMaxAllowableOpacity()
; if opacity is not
a concern, that method will return a value sufficiently low that it
will not constrain scheduling.
getMaxAllowableOpacity()
,
resetMaxAllowableOpacity()
,
setMaxAllowableOpacity(double)
public boolean getAvoidSunrise()
public void setAvoidSunrise(boolean avoid)
avoid
- true if sunrise should be avoided.setAvoidSunriseAndSunset(boolean)
public final void resetAvoidSunrise()
public boolean getAvoidSunset()
public void setAvoidSunset(boolean avoid)
avoid
- true if sunset should be avoided.setAvoidSunriseAndSunset(boolean)
public final void resetAvoidSunset()
public void setAvoidSunriseAndSunset(boolean avoid)
avoid
- true if both sunrise and sunset should be avoided.setAvoidSunrise(boolean)
,
setAvoidSunset(boolean)
public static Angle getSuggestedMinimumSolarSeparation(ReceiverBand receiver, TelescopeConfiguration arrayConfig)
receiver
- the receiver band used to observe the source.arrayConfig
- the configuration of the telescope at the time the source is observed.
public List<SchedulingConstraint> getBlockingConstraints(LinearVelocity windSpeed, Angle api, Angle ionosphericPhase, Angle solarSeparation, boolean nearSunrise, boolean nearSunset)
windSpeed
- the wind velocity to be tested against this constraint.
If you do not wish to use wind in the test for blocking constraints,
use a value of null.api
- the atmospheric phase to be tested against this constraint.
If you do not wish to use API in the test for blocking constraints,
use a value of null.ionosphericPhase
- the ionospheric phase to be tested against this constraint.
If you do not wish to use this phase in the test for blocking constraints,
use a value of null.solarSeparation
- the angle between the sun and the target to be tested against this constraint.
If you do not wish to use this angle in the test for blocking constraints,
use a value of null.nearSunrise
- an indication that the observing time is near sunrise.
If you do not wish to use this quantity in the test for blocking constraints,
use a value of false.nearSunset
- an indication that the observing time is near sunset.
If you do not wish to use this quantity in the test for blocking constraints,
use a value of false.
public boolean hasBlockingConstraints(LinearVelocity windSpeed, Angle api, Angle ionosphericPhase, Angle solarSeparation, boolean nearSunrise, boolean nearSunset)
getBlockingConstraints(LinearVelocity, Angle, Angle, Angle,
boolean, boolean)
for a description of the parameters.
This method is logically equivalent to calling getBlockingConstraints(...).size() > 0, but will often be faster because it stops testing on the first failure.
public EnvironmentalConstraints clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public boolean equals(Object o)
o
is equal to these constraints.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |