com.opttek.optquest
Class COptQuestDiscreteVariable

java.lang.Object
  extended by com.opttek.optquest.COptQuestVariable
      extended by com.opttek.optquest.COptQuestDiscreteVariable
Direct Known Subclasses:
COptQuestBinaryVariable, COptQuestDesignVariable, COptQuestIntegerVariable

public class COptQuestDiscreteVariable
extends COptQuestVariable

The CoptQuestDiscreteVariable class defines a decision variable whose values begin at the lower bound and increment by a step size up to the upper bound


Constructor Summary
COptQuestDiscreteVariable()
          Default constructor
COptQuestDiscreteVariable(double lowerBound, double upperBound, double step)
          Constructor that sets the lower bound,upper bound and step size.
COptQuestDiscreteVariable(java.lang.String name, double lowerBound, double upperBound, double step)
          Constructor that assigns a name to the variable and sets the lower bound, upper bound and step size.
 
Method Summary
 double GetStepSize()
           
 java.lang.String GetType()
           
 void SetStepSize(double val)
          Sets the step size.
 
Methods inherited from class com.opttek.optquest.COptQuestVariable
GetBestValue, GetCurrentValue, GetCurrentValue, GetDOELowerBound, GetDOEUpperBound, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, GetLowerBound, GetName, GetNthBestValue, GetNumberOfExclusiveRanges, GetNumberOfObservations, GetNumberOfPeriods, GetObservationAt, GetObservations, GetPeriodObservationAt, GetPeriodObservations, GetQuality, GetResource, GetSuggestedValue, GetUpperBound, SetCurrentValue, SetCurrentValue, SetExclusiveRange, SetLowerBound, SetName, SetNumberOfPeriods, SetNumberOfQualityMeasures, SetNumberOfResources, SetObservations, SetPeriodObservations, SetQuality, SetResource, SetSuggestedValue, SetUpperBound
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestDiscreteVariable

public COptQuestDiscreteVariable(java.lang.String name,
                                 double lowerBound,
                                 double upperBound,
                                 double step)
Constructor that assigns a name to the variable and sets the lower bound, upper bound and step size.

Parameters:
name - alphanumeric name. Note: the name can contain blanks or special characters. If the variable name is used in a COptQuestStringConstraint equation, the name should be enclosed in square brackets [] in the COptQuestStringConstraint string equation.
lowerBound - a value between -pow(2,31) and +pow(2,31)-1
upperBound - a value between -pow(2,31) and +pow(2,31)-1
step - the step size which can be any value that is less than or equal to the difference between the upper bound and the lower bound.

COptQuestDiscreteVariable

public COptQuestDiscreteVariable(double lowerBound,
                                 double upperBound,
                                 double step)
Constructor that sets the lower bound,upper bound and step size.

Parameters:
lowerBound - a value between -pow(2,31) and +pow(2,31)-1
upperBound - a value between -pow(2,31) and +pow(2,31)-1
step - the step size which can be any value that is less than or equal to the difference between the upper bound and the lower bound.

COptQuestDiscreteVariable

public COptQuestDiscreteVariable()
Default constructor

Method Detail

SetStepSize

public void SetStepSize(double val)
                 throws COptQuestException
Sets the step size.

Overrides:
SetStepSize in class COptQuestVariable
Parameters:
val - the step size which can be any value that is less than or equal to the difference between the upper bound and the lower bound.
Throws:
COptQuestException

GetStepSize

public double GetStepSize()
Overrides:
GetStepSize in class COptQuestVariable

GetType

public java.lang.String GetType()
Overrides:
GetType in class COptQuestVariable