Java Reference
Java Reference
MPConstraint.java
Go to the documentation of this file.
60 main_research_linear_solverJNI.MPConstraint_setCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var, coeff);
68 return main_research_linear_solverJNI.MPConstraint_getCoefficient(swigCPtr, this, MPVariable.getCPtr(var), var);
156 return MPSolver.BasisStatus.swigToEnum(main_research_linear_solverJNI.MPConstraint_basisStatus(swigCPtr, this));
int index()
Returns the index of the constraint in the MPSolver::constraints_.
Definition: MPConstraint.java:133
void setBounds(double lb, double ub)
Sets both the lower and upper bounds.
Definition: MPConstraint.java:102
double dualValue()
Advanced usage: returns the dual value of the constraint in the current solution (only available for...
Definition: MPConstraint.java:141
Advanced usage: possible basis status values for a variable and the slack variable of a linear const...
Definition: MPSolver.java:692
void setCoefficient(MPVariable var, double coeff)
Sets the coefficient of the variable on the constraint.
Definition: MPConstraint.java:59
static BasisStatus swigToEnum(int swigValue)
Definition: MPSolver.java:703
The class for constraints of a Mathematical Programming (MP) model.
Definition: MPConstraint.java:18
void setIsLazy(boolean laziness)
Advanced usage: sets the constraint "laziness".
Definition: MPConstraint.java:126
MPConstraint(long cPtr, boolean cMemoryOwn)
Definition: MPConstraint.java:22
boolean isLazy()
Advanced usage: returns true if the constraint is "lazy" (see below).
Definition: MPConstraint.java:109
MPSolver.BasisStatus basisStatus()
Advanced usage: returns the basis status of the constraint.
Definition: MPConstraint.java:155
The class for variables of a Mathematical Programming (MP) model.
Definition: MPVariable.java:16
double getCoefficient(MPVariable var)
Gets the coefficient of a given variable on the constraint (which is 0 if the variable does not appe...
Definition: MPConstraint.java:67
This mathematical programming (MP) solver class is the main class though which users build and solve...
Definition: MPSolver.java:17