MixedIntegerProgramVariable
is a concept of a variable in a Mixed Integer Programming (MIP) problem.
- Has Models:
CGAL::Variable<FT>
|
| MixedIntegerProgramVariable (MixedIntegerProgramTraits *solver, Variable_type type, FT lb=, FT ub, const std::string &name, int idx) |
| Constructs a variable initialized with the pointer of the solver it belongs to, the variable type, lower bound, upper bound, name, and index.
|
|
◆ Variable_type
A variable can be continuous, integer, or binary.
Enumerator |
---|
CONTINUOUS | |
INTEGER | |
BINARY | |
◆ infinity()
static FT MixedIntegerProgramVariable::infinity |
( |
| ) |
|
|
static |
Gets the infinity threshold (e.g., 1e20).
Values greater than this value are considered as infinity.
◆ solution_value()
FT MixedIntegerProgramVariable::solution_value |
( |
bool |
rounded = false | ) |
const |
Returns the value of the variable in the current solution.
- Note
- (1) Valid only if the program was successfully solved. (2) If the variable is integer and rounded == true, then the value will be rounded to the nearest integer.