Package com.google.ortools.modelbuilder
Class LinearConstraint
java.lang.Object
com.google.ortools.modelbuilder.LinearConstraint
Wrapper around a linear constraint stored in the ModelBuilderHelper instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the constraint builder.intgetIndex()Returns the index of the constraint in the model.doubleReturns the lower bound of the variable.getName()Returns the name of the variable given upon creation.doubleReturns the upper bound of the variable.voidsetLowerBound(double lb) Returns the lower bound of the variable.voidvoidsetUpperBound(double ub) Returns the upper bound of the variable.Inline setter
-
Constructor Details
-
LinearConstraint
-
-
Method Details
-
getIndex
public int getIndex()Returns the index of the constraint in the model. -
getHelper
Returns the constraint builder. -
getLowerBound
public double getLowerBound()Returns the lower bound of the variable. -
setLowerBound
public void setLowerBound(double lb) Returns the lower bound of the variable. -
getUpperBound
public double getUpperBound()Returns the upper bound of the variable. -
setUpperBound
public void setUpperBound(double ub) Returns the upper bound of the variable. -
getName
Returns the name of the variable given upon creation. -
setName
-
addTerm
-
withName
Inline setter
-