Overview | Group | Tree | Graph | Index | Concepts |
An instance of this class represents a constrained integer variable in a Concert
Technology model. If you are looking for a class of numeric variables that may assume
integer values and may be relaxed to assume floating-point values, then consider the
class IloNumVar
. If you are looking for a class of
binary decision variables (that is, variables that assume only the values 0 (zero)
or 1 (one), then consider the class IloBoolVar
.
Bounds of an Integer Variable
The lower and upper bound of an instance of this class is an integer.
What Is Extracted
An instance of IloIntVar
is extracted by
IloSolver
(documented in the ILOG Solver Reference Manual) as an
instance of IlcIntVar
(also documented in the ILOG Solver Reference
Manual).
An instance of IloIntVar
is extracted by IloCplex
(documented in the ILOG CPLEX Reference Manual) as a column representing a
numeric variable of type Int
with bounds as indicated by
IloIntVar
.
Most member functions in this class contain assert
statements. For an
explanation of the macro NDEBUG
(a way to turn on or turn off these
assert
statements), see the concept
Assert and NDEBUG.
IloIntVar
or an IloNumVar
with Type = Int
)
in the constructors of via a modifier (setUB
, setLB
,
setBounds
), they are inward rounded to an integer value. LB
is rounded down and UB
is rounded up.See Also:
Constructor Summary | |
---|---|
public | IloIntVar() |
public | IloIntVar(IloIntVar::ImplClass *) |
public | IloIntVar(IloEnv, IloInt, IloInt, const char *) |
public | IloIntVar(const IloAddNumVar &, IloInt, IloInt, const char *) |
public | IloIntVar(const IloEnv, const IloIntArray, const char *) |
public | IloIntVar(const IloAddNumVar &, const IloIntArray, const char *) |
public | IloIntVar(const IloNumVar) |
Method Summary | |
---|---|
public IloIntVar::ImplClass * | getImpl() |
public IloNum | getLB() |
public IloInt | getMax() |
public IloInt | getMin() |
public IloNum | getUB() |
public void | setBounds(IloInt, IloInt) |
public void | setLB(IloNum) |
public void | setMax(IloInt) |
public void | setMin(IloInt) |
public void | setPossibleValues(const IloIntArray) |
public void | setUB(IloNum) |
Inherited Methods from IloIntExprArg |
---|
getImpl |
Inherited Methods from IloNumExprArg |
---|
getImpl |
Inherited Methods from IloExtractable |
---|
end, getEnv, getId, getImpl, getName, getObject, setName, setObject |
Constructor Detail |
---|
This constructor creates an instance of IloIntVar
like this:
IloNumVar(env, vmin, vmax, ILOINT, name);
This constructor creates an instance of IloIntVar
like this:
IloNumVar(column, lowerBound, upperBound, ILOINT, name);
This constructor calls upon its corresponding IloNumVar
constructor.
This constructor calls upon its corresponding IloNumVar
constructor.
This constructor creates a new handle on var
if it is of type
ILOINT
. Otherwise, an expcetion is thrown.
Method Detail |
---|
This member function returns the lower bound of the invoking variable.
This member function returns the maximal value of the invoking variable.
This member function returns the minimal value of the invoking variable.
This member function returns the upper bound of the invoking variable.
This member function sets lb
as the lower bound and
ub
as the upper bound of the invoking numeric variable.
setBounds
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.
This member function sets min
as the lower bound of the invoking
variable.
setLB
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.
This member function returns the minimal value of the invoking variable
to max
.
setMax
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.
This member function returns the minimal value of the invoking variable
to min
.
setMin
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.
This member function sets values
as the domain of the invoking
integer variable.
setPossibleValues
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.
This member function sets max
as the upper bound of the invoking
variable.
setUB
notifies Concert
Technology algorithms about the change of bounds in this numeric variable.