Package com.opttek.optquest
Class COptQuestBinaryVariable
java.lang.Object
com.opttek.optquest.COptQuestVariable
com.opttek.optquest.COptQuestDiscreteVariable
com.opttek.optquest.COptQuestBinaryVariable
The COptQuestBinaryVariable class defines a binary decision variable which is a
discrete variable that can have a value of 0 or 1.
-
Constructor Summary
ConstructorDescriptionDefault constructor.Constructor that assigns a name to the binary variable. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
SetExclusiveRange
(double low, double high) Illegal method for binary variables.void
SetLowerBound
(double val) Illegal method for binary variables.void
SetStepSize
(double stepSize) Illegal method for binary variables, step size is always 1void
SetUpperBound
(double val) Illegal method for binary variables.Methods inherited from class com.opttek.optquest.COptQuestDiscreteVariable
GetStepSize
Methods inherited from class com.opttek.optquest.COptQuestVariable
equals, GetDOELowerBound, GetDOEUpperBound, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, getID, GetLowerBound, GetName, GetNumberOfExclusiveRanges, GetSuggestedValue, GetUpperBound, getVarRange, hashCode, SetName
-
Constructor Details
-
COptQuestBinaryVariable
Constructor that assigns a name to the binary 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-alphanumeric characters, the name should be enclosed in square brackets []
-
COptQuestBinaryVariable
public COptQuestBinaryVariable()Default constructor.
-
-
Method Details
-
SetLowerBound
Illegal method for binary variables.- Overrides:
SetLowerBound
in classCOptQuestVariable
- Parameters:
val
- a value between -pow(2,31) and +pow(2,31)-1- Throws:
COptQuestException
- if invalid bounds provided
-
SetUpperBound
Illegal method for binary variables.- Overrides:
SetUpperBound
in classCOptQuestVariable
- Parameters:
val
- a value between -pow(2,31) and +pow(2,31)-1- Throws:
COptQuestException
- if invalid bounds provided
-
SetExclusiveRange
Illegal method for binary 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
-
SetStepSize
Illegal method for binary 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
-
isZeroOne
public boolean isZeroOne()- Overrides:
isZeroOne
in classCOptQuestDiscreteVariable
-