|
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
|
The class for variables of a Mathematical Programming (MP) model.
Definition at line 647 of file pywraplp.py.
◆ __init__()
ortools.linear_solver.pywraplp.Variable.__init__ |
( |
| self, |
|
|
* | args, |
|
|
** | kwargs ) |
◆ __getattr__()
ortools.linear_solver.pywraplp.Variable.__getattr__ |
( |
| self, |
|
|
| name ) |
◆ __repr__()
ortools.linear_solver.pywraplp.Variable.__repr__ |
( |
| self | ) |
|
◆ __str__()
ortools.linear_solver.pywraplp.Variable.__str__ |
( |
| self | ) |
|
◆ basis_status()
ortools.linear_solver.pywraplp.Variable.basis_status |
( |
| self | ) |
|
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 700 of file pywraplp.py.
◆ branching_priority()
ortools.linear_solver.pywraplp.Variable.branching_priority |
( |
| self | ) |
|
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 709 of file pywraplp.py.
◆ index()
ortools.linear_solver.pywraplp.Variable.index |
( |
| self | ) |
|
Returns the index of the variable in the MPSolver::variables_.
Definition at line 677 of file pywraplp.py.
◆ Integer()
ortools.linear_solver.pywraplp.Variable.Integer |
( |
| self | ) |
|
◆ integer()
ortools.linear_solver.pywraplp.Variable.integer |
( |
| self | ) |
|
Returns the integrality requirement of the variable.
Definition at line 663 of file pywraplp.py.
◆ Lb()
ortools.linear_solver.pywraplp.Variable.Lb |
( |
| self | ) |
|
◆ lb()
ortools.linear_solver.pywraplp.Variable.lb |
( |
| self | ) |
|
◆ name()
ortools.linear_solver.pywraplp.Variable.name |
( |
| self | ) |
|
Returns the name of the variable.
Definition at line 655 of file pywraplp.py.
◆ reduced_cost()
ortools.linear_solver.pywraplp.Variable.reduced_cost |
( |
| self | ) |
|
Advanced usage: returns the reduced cost of the variable in the current
solution (only available for continuous problems).
Definition at line 693 of file pywraplp.py.
◆ ReducedCost()
ortools.linear_solver.pywraplp.Variable.ReducedCost |
( |
| self | ) |
|
◆ SetBounds()
ortools.linear_solver.pywraplp.Variable.SetBounds |
( |
| self, |
|
|
| lb, |
|
|
| ub ) |
Sets both the lower and upper bounds.
Definition at line 689 of file pywraplp.py.
◆ SetBranchingPriority()
ortools.linear_solver.pywraplp.Variable.SetBranchingPriority |
( |
| self, |
|
|
| priority ) |
◆ SetInteger()
ortools.linear_solver.pywraplp.Variable.SetInteger |
( |
| self, |
|
|
| integer ) |
Sets the integrality requirement of the variable.
Definition at line 659 of file pywraplp.py.
◆ SetLb()
ortools.linear_solver.pywraplp.Variable.SetLb |
( |
| self, |
|
|
| x ) |
◆ SetUb()
ortools.linear_solver.pywraplp.Variable.SetUb |
( |
| self, |
|
|
| x ) |
◆ solution_value()
ortools.linear_solver.pywraplp.Variable.solution_value |
( |
| self | ) |
|
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 667 of file pywraplp.py.
◆ SolutionValue()
ortools.linear_solver.pywraplp.Variable.SolutionValue |
( |
| self | ) |
|
◆ Ub()
ortools.linear_solver.pywraplp.Variable.Ub |
( |
| self | ) |
|
◆ ub()
ortools.linear_solver.pywraplp.Variable.ub |
( |
| self | ) |
|
◆ thisown
ortools.linear_solver.pywraplp.Variable.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
|
static |
The documentation for this class was generated from the following file: