Package com.opttek.optquest
Class COptQuestDesignVariable
java.lang.Object
com.opttek.optquest.COptQuestVariable
com.opttek.optquest.COptQuestDiscreteVariable
com.opttek.optquest.COptQuestDesignVariable
Deprecated.
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. The number of choices available within the specified range
depends on the step size.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructorCOptQuestDesignVariable(double lowerBound, double upperBound, double step) Deprecated.Constructor that sets the lower bound, upper bound, and step size.COptQuestDesignVariable(String name, double lowerBound, double upperBound, double step) Deprecated.Constructor that assigns a name to the variable and sets the name, lower bound, upper bound, and step size. -
Method Summary
Modifier and TypeMethodDescriptionvoidSetExclusiveRange(double low, double high) Deprecated.Illegal method for design variables.Methods inherited from class com.opttek.optquest.COptQuestDiscreteVariable
GetStepSize, isZeroOne, SetStepSizeMethods 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
Deprecated.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) Deprecated.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()Deprecated.Default constructor
-
-
Method Details
-
SetExclusiveRange
Deprecated.Illegal method for design variables.- Overrides:
SetExclusiveRangein classCOptQuestVariable- Parameters:
low- - any value > low will be excludedhigh- - any value < high will be excluded- Throws:
COptQuestException- if invalid range provided
-
COptQuestChoiceVariable) instead. Add it withOptQuestModel.AddChoiceVariable(String, int). The value of a choice variable is the number of the selected option, from 1 to the number of options.