Class Constraint


  • public class Constraint
    extends java.lang.Object
    Creates a constraint with following settings:
    • Relationship (EQ, GEQ, LEQ) as given in constructor
    • Value as given in constructor
    • Setting each coefficient, i.e.
       y = 1*p1 + 0*q1 * + 1*p2 + 0*q1 +...
       
    • Constructor Detail

      • Constraint

        public Constraint​(java.lang.String description,
                          java.util.List<LinearCoefficient> coefficients,
                          Relationship relationship,
                          double value)
      • Constraint

        public Constraint​(java.lang.String description,
                          LinearCoefficient[] coefficients,
                          Relationship relationship)
        Creates an initially disabled Constraint
        Parameters:
        coefficients -
        relationship -
      • Constraint

        public Constraint​(java.lang.String description,
                          LinearCoefficient[] coefficients,
                          Relationship relationship,
                          java.util.Optional<java.lang.Double> value)
      • Constraint

        public Constraint​(java.lang.String description,
                          java.util.List<LinearCoefficient> coefficients,
                          Relationship relationship,
                          java.util.Optional<java.lang.Double> value)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDescription

        public java.lang.String getDescription()
      • getValue

        public java.util.Optional<java.lang.Double> getValue()
      • setValue

        public void setValue​(double value)
      • disable

        public void disable()