Java Reference
Java Reference
MPObjective.java
Go to the documentation of this file.
59 main_research_linear_solverJNI.MPObjective_setCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var, coeff);
68 return main_research_linear_solverJNI.MPObjective_getCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var);
double value()
Returns the objective value of the best solution found so far.
Definition: MPObjective.java:131
boolean minimization()
Is the optimization direction set to minimize?
Definition: MPObjective.java:116
void setCoefficient(MPVariable var, double coeff)
Sets the coefficient of the variable in the objective.
Definition: MPObjective.java:58
MPObjective(long cPtr, boolean cMemoryOwn)
Definition: MPObjective.java:20
boolean maximization()
Is the optimization direction set to maximize?
Definition: MPObjective.java:109
double getCoefficient(MPVariable var)
Gets the coefficient of a given variable in the objective It returns 0 if the variable does not ap...
Definition: MPObjective.java:67
void clear()
Clears the offset, all variables and coefficients, and the optimization direction.
Definition: MPObjective.java:48
A class to express a linear objective.
Definition: MPObjective.java:16
The class for variables of a Mathematical Programming (MP) model.
Definition: MPVariable.java:16
void setOptimizationDirection(boolean maximize)
Sets the optimization direction (maximize: true or minimize: false).
Definition: MPObjective.java:88