edu.nrao.sss.model.project.scheduling.constraint
Class Constraint

java.lang.Object
  extended by edu.nrao.sss.model.project.scheduling.constraint.Constraint
Direct Known Subclasses:
ConstraintApi, ConstraintPositionElevation, ConstraintPositionMaximum, ConstraintWind

public abstract class Constraint
extends Object

Represents an operating condition such as wind, API, and the position of the target and evaluates the probability of a scheduling block meeting its scientific goals under the operating condition.

Author:
slovelan

Field Summary
protected  ConstraintType constraintType
           
 
Constructor Summary
Constraint()
           
Constraint(Constraint c)
           
 
Method Summary
 boolean equals(Object other)
           
protected  Constraint getConstraint(List<Constraint> constraints)
          Returns the constraint matching this one in the list.
 ConstraintType getConstraintType()
          Returns the type of operation condition for this constraint.
abstract  ConstraintProbability getProbabilitySuccess(List<Constraint> currentConditions)
          Returns a ConstraintProbability indicating the probability of success of the scheduling block with respect to this requirement.
abstract  Object getValue()
           
 int hashCode()
           
abstract  boolean isSpecified()
          Returns true if this constraint represents a restriction in terms of scheduling on the block; false otherwise.
abstract  void reset()
          Resets this constraint back to its original default (unspecified value).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraintType

protected ConstraintType constraintType
Constructor Detail

Constraint

public Constraint()

Constraint

public Constraint(Constraint c)
Method Detail

getProbabilitySuccess

public abstract ConstraintProbability getProbabilitySuccess(List<Constraint> currentConditions)
Returns a ConstraintProbability indicating the probability of success of the scheduling block with respect to this requirement.

Parameters:
currentConditions - the current external operating condition the could be the current wind speed if the constraint represents wind speed or a date if the constraint represents a position elevation.
Returns:
a ConstraintProbability indicating the probability of successful completion of this scheduling block under the current operating conditions.

reset

public abstract void reset()
Resets this constraint back to its original default (unspecified value).


isSpecified

public abstract boolean isSpecified()
Returns true if this constraint represents a restriction in terms of scheduling on the block; false otherwise.

Returns:
true if this constraint is inot in its default state; false otherwise.

getConstraint

protected Constraint getConstraint(List<Constraint> constraints)
Returns the constraint matching this one in the list.

Parameters:
constraints - a list of constraints.
Returns:
the constraint matching this one.

getConstraintType

public ConstraintType getConstraintType()
Returns the type of operation condition for this constraint.

Returns:
the ConstraintType for this operating condition.

getValue

public abstract Object getValue()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.