com.opttek.optquest
Class COptQuestUserControlledVariable

java.lang.Object
  extended by com.opttek.optquest.COptQuestVariable
      extended by com.opttek.optquest.COptQuestUserControlledVariable

public class COptQuestUserControlledVariable
extends COptQuestVariable

The COptQuestUserControlledVariable class allows you to define a variable where you set the value of the variable. Unlike a COptQuestVariable whose possible value is determined by the OptQuest Engine, you provide the values for COptQuestUserControlledVariable objects.

COptQuestUserControlledVariable objects can be used in the mathematical expression of COptQuestStringConstraint objects or a COptQuestStringObjective object. For example, you may define a COptQuestUserControlledVariable that represents a risk calculation and use the risk value in a COptQuestStringConstraint that says risk must be less than or equal to n. In the COptQuestOptimization::Evaluate(COptQuestSolution) method, you would compute the risk value and use the COptQuestSolution.SetVariableValue() method to set the risk value in the solution. The OptQuestEngine would use this value when checking the constraint for feasiblity.


Constructor Summary
COptQuestUserControlledVariable()
          Default constructor
COptQuestUserControlledVariable(java.lang.String name)
          Constructor that assigns a name to the variable.
 
Method Summary
 java.lang.String GetType()
           
 void SetExclusiveRange(double low, double high)
          Not valid for COptQuestUserControlledVariables
 void SetLowerBound(double lowerBound)
          Not valid for COptQuestUserControlledVariables
 void SetStepSize(double stepSize)
          Not valid for COptQuestUserControlledVariables
 void SetUpperBound(double upperBound)
          Not valid for COptQuestUserControlledVariables
 
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, GetStepSize, GetSuggestedValue, GetUpperBound, SetCurrentValue, SetCurrentValue, SetName, SetNumberOfPeriods, SetNumberOfQualityMeasures, SetNumberOfResources, SetObservations, SetPeriodObservations, SetQuality, SetResource, SetSuggestedValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestUserControlledVariable

public COptQuestUserControlledVariable(java.lang.String name)
Constructor that assigns a name to the variable.

Parameters:
name - alphanumeric name. Note: the name can contain blanks or special characters. If the variable name is used in a COptQuestConstraintString equation and it contains non-alphnumeric characters, the name should be enclosed in square brackets []

COptQuestUserControlledVariable

public COptQuestUserControlledVariable()
Default constructor

Method Detail

SetStepSize

public void SetStepSize(double stepSize)
                 throws COptQuestException
Not valid for COptQuestUserControlledVariables

Overrides:
SetStepSize in class COptQuestVariable
Throws:
COptQuestException

SetLowerBound

public void SetLowerBound(double lowerBound)
                   throws COptQuestException
Not valid for COptQuestUserControlledVariables

Overrides:
SetLowerBound in class COptQuestVariable
Parameters:
lowerBound - a value between -pow(2,31) and +pow(2,31)-1
Throws:
COptQuestException

SetUpperBound

public void SetUpperBound(double upperBound)
                   throws COptQuestException
Not valid for COptQuestUserControlledVariables

Overrides:
SetUpperBound in class COptQuestVariable
Parameters:
upperBound - a value between -pow(2,31) and +pow(2,31)-1
Throws:
COptQuestException

SetExclusiveRange

public void SetExclusiveRange(double low,
                              double high)
                       throws COptQuestException
Not valid for COptQuestUserControlledVariables

Overrides:
SetExclusiveRange in class COptQuestVariable
Parameters:
low - - any value > low will be excluded
high - - any value < high will be exluded
Throws:
COptQuestException

GetType

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