Class LinearConstraint

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated
    public class LinearConstraint
    extends java.lang.Object
    implements java.io.Serializable
    Deprecated.
    As of 3.1 (to be removed in 4.0).
    A linear constraint for a linear optimization problem.

    A linear constraint has one of the forms:

    • c1x1 + ... cnxn = v
    • c1x1 + ... cnxn <= v
    • c1x1 + ... cnxn >= v
    • l1x1 + ... lnxn + lcst = r1x1 + ... rnxn + rcst
    • l1x1 + ... lnxn + lcst <= r1x1 + ... rnxn + rcst
    • l1x1 + ... lnxn + lcst >= r1x1 + ... rnxn + rcst
    The ci, li or ri are the coefficients of the constraints, the xi are the coordinates of the current point and v is the value of the constraint.

    Since:
    2.0
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private RealVector coefficients
      Deprecated.
      Coefficients of the constraint (left hand side).
      private Relationship relationship
      Deprecated.
      Relationship between left and right hand sides (=, <=, >=).
      private static long serialVersionUID
      Deprecated.
      Serializable version identifier.
      private double value
      Deprecated.
      Value of the constraint (right hand side).
    • Constructor Summary

      Constructors 
      Constructor Description
      LinearConstraint​(double[] lhsCoefficients, double lhsConstant, Relationship relationship, double[] rhsCoefficients, double rhsConstant)
      Deprecated.
      Build a constraint involving two linear equations.
      LinearConstraint​(double[] coefficients, Relationship relationship, double value)
      Deprecated.
      Build a constraint involving a single linear equation.
      LinearConstraint​(RealVector lhsCoefficients, double lhsConstant, Relationship relationship, RealVector rhsCoefficients, double rhsConstant)
      Deprecated.
      Build a constraint involving two linear equations.
      LinearConstraint​(RealVector coefficients, Relationship relationship, double value)
      Deprecated.
      Build a constraint involving a single linear equation.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)
      Deprecated.
      RealVector getCoefficients()
      Deprecated.
      Get the coefficients of the constraint (left hand side).
      Relationship getRelationship()
      Deprecated.
      Get the relationship between left and right hand sides.
      double getValue()
      Deprecated.
      Get the value of the constraint (right hand side).
      int hashCode()
      Deprecated.
      private void readObject​(java.io.ObjectInputStream ois)
      Deprecated.
      Deserialize the instance.
      private void writeObject​(java.io.ObjectOutputStream oos)
      Deprecated.
      Serialize the instance.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Deprecated.
        Serializable version identifier.
        See Also:
        Constant Field Values
      • coefficients

        private final transient RealVector coefficients
        Deprecated.
        Coefficients of the constraint (left hand side).
      • relationship

        private final Relationship relationship
        Deprecated.
        Relationship between left and right hand sides (=, <=, >=).
      • value

        private final double value
        Deprecated.
        Value of the constraint (right hand side).
    • Constructor Detail

      • LinearConstraint

        public LinearConstraint​(double[] coefficients,
                                Relationship relationship,
                                double value)
        Deprecated.
        Build a constraint involving a single linear equation.

        A linear constraint with a single linear equation has one of the forms:

        • c1x1 + ... cnxn = v
        • c1x1 + ... cnxn <= v
        • c1x1 + ... cnxn >= v

        Parameters:
        coefficients - The coefficients of the constraint (left hand side)
        relationship - The type of (in)equality used in the constraint
        value - The value of the constraint (right hand side)
      • LinearConstraint

        public LinearConstraint​(RealVector coefficients,
                                Relationship relationship,
                                double value)
        Deprecated.
        Build a constraint involving a single linear equation.

        A linear constraint with a single linear equation has one of the forms:

        • c1x1 + ... cnxn = v
        • c1x1 + ... cnxn <= v
        • c1x1 + ... cnxn >= v

        Parameters:
        coefficients - The coefficients of the constraint (left hand side)
        relationship - The type of (in)equality used in the constraint
        value - The value of the constraint (right hand side)
      • LinearConstraint

        public LinearConstraint​(double[] lhsCoefficients,
                                double lhsConstant,
                                Relationship relationship,
                                double[] rhsCoefficients,
                                double rhsConstant)
        Deprecated.
        Build a constraint involving two linear equations.

        A linear constraint with two linear equation has one of the forms:

        • l1x1 + ... lnxn + lcst = r1x1 + ... rnxn + rcst
        • l1x1 + ... lnxn + lcst <= r1x1 + ... rnxn + rcst
        • l1x1 + ... lnxn + lcst >= r1x1 + ... rnxn + rcst

        Parameters:
        lhsCoefficients - The coefficients of the linear expression on the left hand side of the constraint
        lhsConstant - The constant term of the linear expression on the left hand side of the constraint
        relationship - The type of (in)equality used in the constraint
        rhsCoefficients - The coefficients of the linear expression on the right hand side of the constraint
        rhsConstant - The constant term of the linear expression on the right hand side of the constraint
      • LinearConstraint

        public LinearConstraint​(RealVector lhsCoefficients,
                                double lhsConstant,
                                Relationship relationship,
                                RealVector rhsCoefficients,
                                double rhsConstant)
        Deprecated.
        Build a constraint involving two linear equations.

        A linear constraint with two linear equation has one of the forms:

        • l1x1 + ... lnxn + lcst = r1x1 + ... rnxn + rcst
        • l1x1 + ... lnxn + lcst <= r1x1 + ... rnxn + rcst
        • l1x1 + ... lnxn + lcst >= r1x1 + ... rnxn + rcst

        Parameters:
        lhsCoefficients - The coefficients of the linear expression on the left hand side of the constraint
        lhsConstant - The constant term of the linear expression on the left hand side of the constraint
        relationship - The type of (in)equality used in the constraint
        rhsCoefficients - The coefficients of the linear expression on the right hand side of the constraint
        rhsConstant - The constant term of the linear expression on the right hand side of the constraint
    • Method Detail

      • getCoefficients

        public RealVector getCoefficients()
        Deprecated.
        Get the coefficients of the constraint (left hand side).
        Returns:
        coefficients of the constraint (left hand side)
      • getRelationship

        public Relationship getRelationship()
        Deprecated.
        Get the relationship between left and right hand sides.
        Returns:
        relationship between left and right hand sides
      • getValue

        public double getValue()
        Deprecated.
        Get the value of the constraint (right hand side).
        Returns:
        value of the constraint (right hand side)
      • equals

        public boolean equals​(java.lang.Object other)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream oos)
                          throws java.io.IOException
        Deprecated.
        Serialize the instance.
        Parameters:
        oos - stream where object should be written
        Throws:
        java.io.IOException - if object cannot be written to stream
      • readObject

        private void readObject​(java.io.ObjectInputStream ois)
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
        Deprecated.
        Deserialize the instance.
        Parameters:
        ois - stream from which the object should be read
        Throws:
        java.lang.ClassNotFoundException - if a class in the stream cannot be found
        java.io.IOException - if object cannot be read from the stream