The class for variables of a Mathematical Programming (MP) model.
More...
The class for variables of a Mathematical Programming (MP) model.
Definition at line 1156 of file linear_solver.h.
#include <linear_solver.h>
◆ MPVariable() [1/2]
| operations_research::MPVariable::MPVariable |
( |
const MPVariable & | | ) |
|
|
delete |
◆ MPVariable() [2/2]
| operations_research::MPVariable::MPVariable |
( |
int | index, |
|
|
double | lb, |
|
|
double | ub, |
|
|
bool | integer, |
|
|
const std::string & | name, |
|
|
MPSolverInterface *const | interface_in ) |
|
inlineprotected |
◆ basis_status()
Advanced usage: returns the basis status of the variable in the current solution (only available for continuous problems).
- See also
- MPSolver::BasisStatus.
Definition at line 310 of file linear_solver.cc.
◆ branching_priority()
| int operations_research::MPVariable::branching_priority |
( |
| ) |
const |
|
inline |
Advanced usage: Certain MIP solvers (e.g. Gurobi or SCIP) allow you to set a per-variable priority for determining which variable to branch on.
A value of 0 is treated as default, and is equivalent to not setting the branching priority. The solver looks first to branch on fractional variables in higher priority levels. As of 2019-05, only Gurobi and SCIP support setting branching priority; all other solvers will simply ignore this annotation.
Definition at line 1232 of file linear_solver.h.
◆ index()
| int operations_research::MPVariable::index |
( |
| ) |
const |
|
inline |
Returns the index of the variable in the MPSolver::variables_.
Definition at line 1183 of file linear_solver.h.
◆ integer()
| bool operations_research::MPVariable::integer |
( |
| ) |
const |
|
inline |
Returns the integrality requirement of the variable.
Definition at line 1171 of file linear_solver.h.
◆ lb()
| double operations_research::MPVariable::lb |
( |
| ) |
const |
|
inline |
◆ name()
| const std::string & operations_research::MPVariable::name |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ reduced_cost()
| double operations_research::MPVariable::reduced_cost |
( |
| ) |
const |
Advanced usage: returns the reduced cost of the variable in the current solution (only available for continuous problems).
Definition at line 301 of file linear_solver.cc.
◆ set_reduced_cost()
| void operations_research::MPVariable::set_reduced_cost |
( |
double | reduced_cost | ) |
|
|
inlineprotected |
◆ set_solution_value()
| void operations_research::MPVariable::set_solution_value |
( |
double | value | ) |
|
|
inlineprotected |
◆ SetBounds()
| void operations_research::MPVariable::SetBounds |
( |
double | lb, |
|
|
double | ub ) |
◆ SetBranchingPriority()
| void operations_research::MPVariable::SetBranchingPriority |
( |
int | priority | ) |
|
◆ SetInteger()
| void operations_research::MPVariable::SetInteger |
( |
bool | integer | ) |
|
Sets the integrality requirement of the variable.
Definition at line 331 of file linear_solver.cc.
◆ SetLB()
| void operations_research::MPVariable::SetLB |
( |
double | lb | ) |
|
|
inline |
◆ SetUB()
| void operations_research::MPVariable::SetUB |
( |
double | ub | ) |
|
|
inline |
◆ solution_value()
| double operations_research::MPVariable::solution_value |
( |
| ) |
const |
Returns the value of the variable in the current solution.
If the variable is integer, then the value will always be an integer (the underlying solver handles floating-point values only, but this function automatically rounds it to the nearest integer; see: man 3 round).
Definition at line 287 of file linear_solver.cc.
◆ ub()
| double operations_research::MPVariable::ub |
( |
| ) |
const |
|
inline |
◆ unrounded_solution_value()
| double operations_research::MPVariable::unrounded_solution_value |
( |
| ) |
const |
Advanced usage: unrounded solution value.
The returned value won't be rounded to the nearest integer even if the variable is integer.
Definition at line 296 of file linear_solver.cc.
◆ BopInterface
| friend class BopInterface |
|
friend |
◆ CBCInterface
| friend class CBCInterface |
|
friend |
◆ CLPInterface
| friend class CLPInterface |
|
friend |
◆ CplexInterface
| friend class CplexInterface |
|
friend |
◆ GLOPInterface
| friend class GLOPInterface |
|
friend |
◆ GLPKInterface
| friend class GLPKInterface |
|
friend |
◆ GurobiInterface
| friend class GurobiInterface |
|
friend |
◆ HighsInterface
| friend class HighsInterface |
|
friend |
◆ KnapsackInterface
| friend class KnapsackInterface |
|
friend |
◆ MPSolver
◆ MPSolverInterface
| friend class MPSolverInterface |
|
friend |
◆ MPVariableSolutionValueTest
| friend class MPVariableSolutionValueTest |
|
friend |
◆ PdlpInterface
| friend class PdlpInterface |
|
friend |
◆ SatInterface
| friend class SatInterface |
|
friend |
◆ SCIPInterface
| friend class SCIPInterface |
|
friend |
◆ SLMInterface
| friend class SLMInterface |
|
friend |
◆ XpressInterface
| friend class XpressInterface |
|
friend |
The documentation for this class was generated from the following files: