Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
synchronized void | delete () |
void | clear () |
void | setCoefficient (MPVariable var, double coeff) |
double | getCoefficient (MPVariable var) |
void | setOffset (double value) |
double | offset () |
void | setOptimizationDirection (boolean maximize) |
void | setMinimization () |
void | setMaximization () |
boolean | maximization () |
boolean | minimization () |
double | value () |
double | bestBound () |
Protected Member Functions | |
MPObjective (long cPtr, boolean cMemoryOwn) | |
void | finalize () |
Static Protected Member Functions | |
static long | getCPtr (MPObjective obj) |
static long | swigRelease (MPObjective obj) |
Protected Attributes | |
transient boolean | swigCMemOwn |
A class to express a linear objective.
Definition at line 16 of file MPObjective.java.
|
protected |
Definition at line 20 of file MPObjective.java.
double com.google.ortools.linearsolver.MPObjective.bestBound | ( | ) |
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 153 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.clear | ( | ) |
Clears the offset, all variables and coefficients, and the optimization
direction.
Definition at line 60 of file MPObjective.java.
synchronized void com.google.ortools.linearsolver.MPObjective.delete | ( | ) |
Definition at line 46 of file MPObjective.java.
|
protected |
Definition at line 42 of file MPObjective.java.
double com.google.ortools.linearsolver.MPObjective.getCoefficient | ( | MPVariable | 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 79 of file MPObjective.java.
|
staticprotected |
Definition at line 25 of file MPObjective.java.
boolean com.google.ortools.linearsolver.MPObjective.maximization | ( | ) |
Is the optimization direction set to maximize?
Definition at line 121 of file MPObjective.java.
boolean com.google.ortools.linearsolver.MPObjective.minimization | ( | ) |
Is the optimization direction set to minimize?
Definition at line 128 of file MPObjective.java.
double com.google.ortools.linearsolver.MPObjective.offset | ( | ) |
Gets the constant term in the objective.
Definition at line 93 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.setCoefficient | ( | MPVariable | var, |
double | 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 70 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.setMaximization | ( | ) |
Sets the optimization direction to maximize.
Definition at line 114 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.setMinimization | ( | ) |
Sets the optimization direction to minimize.
Definition at line 107 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.setOffset | ( | double | value | ) |
Sets the constant term in the objective.
Definition at line 86 of file MPObjective.java.
void com.google.ortools.linearsolver.MPObjective.setOptimizationDirection | ( | boolean | maximize | ) |
Sets the optimization direction (maximize: true or minimize: false).
Definition at line 100 of file MPObjective.java.
|
staticprotected |
Definition at line 29 of file MPObjective.java.
double com.google.ortools.linearsolver.MPObjective.value | ( | ) |
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 143 of file MPObjective.java.
|
protected |
Definition at line 18 of file MPObjective.java.