Package com.opttek.optquest
Class COptQuestDesignVariable
java.lang.Object
com.opttek.optquest.COptQuestVariable
com.opttek.optquest.COptQuestDiscreteVariable
com.opttek.optquest.COptQuestDesignVariable
Design variables are used when value of the decision variable represents an
alternative, and not a quantity. For example, the variable may take on the
values red, green or blue. Design variables are useful in optimization
problems where the decision variables consist of choosing the best alternative
from a catalog, and a larger number may not imply the commitment of more
resources. Therefore, choice #10 may not be a more costly or a better choice
than choice #1. These variables are defined by a lower bound, an upper bound,
and a step size that controls the number of choices available within the
specified range.
-
Constructor Summary
ConstructorDescriptionDefault constructorCOptQuestDesignVariable
(double lowerBound, double upperBound, double step) Constructor that sets the lower bound, upper bound, and step size.COptQuestDesignVariable
(String name, double lowerBound, double upperBound, double step) Constructor that assigns a name to the variable and sets the name, lower bound, upper bound, and step size. -
Method Summary
Modifier and TypeMethodDescriptionvoid
SetExclusiveRange
(double low, double high) Illegal method for design variables.Methods inherited from class com.opttek.optquest.COptQuestDiscreteVariable
GetStepSize, isZeroOne, SetStepSize
Methods inherited from class com.opttek.optquest.COptQuestVariable
equals, GetDOELowerBound, GetDOEUpperBound, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, getID, GetLowerBound, GetName, GetNumberOfExclusiveRanges, GetSuggestedValue, GetUpperBound, getVarRange, hashCode, SetLowerBound, SetName, SetUpperBound
-
Constructor Details
-
COptQuestDesignVariable
Constructor that assigns a name to the variable and sets the name, 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)-1upperBound
- a value between -pow(2,31) and +pow(2,31)-1step
- step size
-
COptQuestDesignVariable
public COptQuestDesignVariable(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)-1upperBound
- a value between -pow(2,31) and +pow(2,31)-1step
- step size
-
COptQuestDesignVariable
public COptQuestDesignVariable()Default constructor
-
-
Method Details
-
SetExclusiveRange
Illegal method for design variables.- Overrides:
SetExclusiveRange
in classCOptQuestVariable
- Parameters:
low
- - any value > low will be excludedhigh
- - any value < high will be excluded- Throws:
COptQuestException
- if invalid range provided
-