|
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
|
A class to express a linear objective.
Definition at line 557 of file pywraplp.py.
◆ __init__()
ortools.linear_solver.pywraplp.Objective.__init__ |
( |
| self, |
|
|
* | args, |
|
|
** | kwargs ) |
◆ BestBound()
ortools.linear_solver.pywraplp.Objective.BestBound |
( |
| self | ) |
|
Returns the best objective bound.
In case of minimization, it is a lower bound on the objective value of the
optimal integer solution. Only available for discrete problems.
Definition at line 632 of file pywraplp.py.
◆ Clear()
ortools.linear_solver.pywraplp.Objective.Clear |
( |
| self | ) |
|
Clears the offset, all variables and coefficients, and the optimization
direction.
Definition at line 566 of file pywraplp.py.
◆ GetCoefficient()
ortools.linear_solver.pywraplp.Objective.GetCoefficient |
( |
| self, |
|
|
| var ) |
Gets the coefficient of a given variable in the objective
It returns 0 if the variable does not appear in the objective).
Definition at line 582 of file pywraplp.py.
◆ maximization()
ortools.linear_solver.pywraplp.Objective.maximization |
( |
| self | ) |
|
Is the optimization direction set to maximize?
Definition at line 610 of file pywraplp.py.
◆ minimization()
ortools.linear_solver.pywraplp.Objective.minimization |
( |
| self | ) |
|
Is the optimization direction set to minimize?
Definition at line 614 of file pywraplp.py.
◆ Offset()
ortools.linear_solver.pywraplp.Objective.Offset |
( |
| self | ) |
|
◆ offset()
ortools.linear_solver.pywraplp.Objective.offset |
( |
| self | ) |
|
Gets the constant term in the objective.
Definition at line 594 of file pywraplp.py.
◆ SetCoefficient()
ortools.linear_solver.pywraplp.Objective.SetCoefficient |
( |
| self, |
|
|
| var, |
|
|
| coeff ) |
Sets the coefficient of the variable in the objective.
If the variable does not belong to the solver, the function just returns,
or crashes in non-opt mode.
Definition at line 573 of file pywraplp.py.
◆ SetMaximization()
ortools.linear_solver.pywraplp.Objective.SetMaximization |
( |
| self | ) |
|
Sets the optimization direction to maximize.
Definition at line 606 of file pywraplp.py.
◆ SetMinimization()
ortools.linear_solver.pywraplp.Objective.SetMinimization |
( |
| self | ) |
|
Sets the optimization direction to minimize.
Definition at line 602 of file pywraplp.py.
◆ SetOffset()
ortools.linear_solver.pywraplp.Objective.SetOffset |
( |
| self, |
|
|
| value ) |
Sets the constant term in the objective.
Definition at line 590 of file pywraplp.py.
◆ SetOptimizationDirection()
ortools.linear_solver.pywraplp.Objective.SetOptimizationDirection |
( |
| self, |
|
|
| maximize ) |
Sets the optimization direction (maximize: true or minimize: false).
Definition at line 598 of file pywraplp.py.
◆ Value()
ortools.linear_solver.pywraplp.Objective.Value |
( |
| self | ) |
|
Returns the objective value of the best solution found so far.
It is the optimal objective value if the problem has been solved to
optimality.
Note: the objective value may be slightly different than what you could
compute yourself using ``MPVariable::solution_value();`` please use the
--verify_solution flag to gain confidence about the numerical stability of
your solution.
Definition at line 618 of file pywraplp.py.
◆ thisown
ortools.linear_solver.pywraplp.Objective.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: