Class LinearConstraint

java.lang.Object
com.google.ortools.modelbuilder.LinearConstraint

public class LinearConstraint extends Object
Wrapper around a linear constraint stored in the ModelBuilderHelper instance.
  • Constructor Details

  • Method Details

    • getIndex

      public int getIndex()
      Returns the index of the constraint in the model.
    • getHelper

      public ModelBuilderHelper 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

      public String getName()
      Returns the name of the variable given upon creation.
    • setName

      public void setName(String name)
    • addTerm

      public void addTerm(Variable var, double coeff)
    • withName

      public LinearConstraint withName(String name)
      Inline setter