Package com.opttek.optquest
Class COptQuestIntegerVariable
java.lang.Object
com.opttek.optquest.COptQuestVariable
com.opttek.optquest.COptQuestDiscreteVariable
com.opttek.optquest.COptQuestIntegerVariable
The COptQuestIntegerVariable class defines a decision variable whose values
begin at the lower bound and increment by a 1 to the upper bound.
-
Constructor Summary
ConstructorDescriptionDefault constructorCOptQuestIntegerVariable
(double lowerBound, double upperBound) Constructor that sets the lower bound and upper bound.COptQuestIntegerVariable
(String name, double lowerBound, double upperBound) Constructor that assigns a name to the variable and sets the lower bound and upper bound. -
Method Summary
Modifier and TypeMethodDescriptionvoid
SetStepSize
(double stepSize) Illegal method for integer variables, step size is always 1Methods inherited from class com.opttek.optquest.COptQuestDiscreteVariable
GetStepSize, isZeroOne
Methods inherited from class com.opttek.optquest.COptQuestVariable
equals, GetDOELowerBound, GetDOEUpperBound, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, getID, GetLowerBound, GetName, GetNumberOfExclusiveRanges, GetSuggestedValue, GetUpperBound, getVarRange, hashCode, SetExclusiveRange, SetLowerBound, SetName, SetUpperBound
-
Constructor Details
-
COptQuestIntegerVariable
Constructor that assigns a name to the variable and sets the lower bound and upper bound.- 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)-1
-
COptQuestIntegerVariable
public COptQuestIntegerVariable(double lowerBound, double upperBound) Constructor that sets the lower bound and upper bound.- Parameters:
lowerBound
- a value between -pow(2,31) and +pow(2,31)-1upperBound
- a value between -pow(2,31) and +pow(2,31)-1
-
COptQuestIntegerVariable
public COptQuestIntegerVariable()Default constructor
-
-
Method Details
-
SetStepSize
Illegal method for integer variables, step size is always 1- Overrides:
SetStepSize
in classCOptQuestDiscreteVariable
- Parameters:
stepSize
- 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. If the range is not divisible by the step size, the range is extended by extending the upper bound.- Throws:
COptQuestException
- if step size is not valid for variable type
-