public class MPConstraint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
swigCMemOwn |
Modifier | Constructor and Description |
---|---|
protected |
MPConstraint(long cPtr,
boolean cMemoryOwn) |
Modifier and Type | Method and Description |
---|---|
MPSolver.BasisStatus |
basisStatus()
Advanced usage: returns the basis status of the constraint.
|
void |
delete() |
double |
dualValue()
Advanced usage: returns the dual value of the constraint in the current
solution (only available for continuous problems). |
protected void |
finalize() |
double |
getCoefficient(MPVariable var)
Gets the coefficient of a given variable on the constraint (which is 0 if
the variable does not appear in the constraint). |
protected static long |
getCPtr(MPConstraint obj) |
int |
index()
Returns the index of the constraint in the MPSolver::constraints_.
|
boolean |
isLazy()
Advanced usage: returns true if the constraint is "lazy" (see below).
|
double |
lb()
Returns the lower bound.
|
java.lang.String |
name()
Returns the name of the constraint.
|
void |
setBounds(double lb,
double ub)
Sets both the lower and upper bounds.
|
void |
setCoefficient(MPVariable var,
double coeff)
Sets the coefficient of the variable on the constraint.
|
void |
setIsLazy(boolean laziness)
Advanced usage: sets the constraint "laziness".
|
void |
setLb(double lb)
Sets the lower bound.
|
void |
setUb(double ub)
Sets the upper bound.
|
protected static long |
swigRelease(MPConstraint obj) |
double |
ub()
Returns the upper bound.
|
protected static long getCPtr(MPConstraint obj)
protected static long swigRelease(MPConstraint obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public java.lang.String name()
public void setCoefficient(MPVariable var, double coeff)
public double getCoefficient(MPVariable var)
public double lb()
public double ub()
public void setLb(double lb)
public void setUb(double ub)
public void setBounds(double lb, double ub)
public boolean isLazy()
public void setIsLazy(boolean laziness)
public int index()
public double dualValue()
public MPSolver.BasisStatus basisStatus()
MPSolver#BasisStatus.
Copyright © 2025. All rights reserved.