Class Constraint


  • public final class Constraint
    extends java.lang.Object
    This class allows you to build objects, each of which represents a constraint for a linear programming problem expressed in matrix notation
    Version:
    1.0
    Author:
    Stefano Scarioli
    See Also:
    SSC Software www.sscLab.org
    • Constructor Summary

      Constructors 
      Constructor Description
      Constraint​(double[] Aj, ConsType rel, double rhs)  
    • Constructor Detail

      • Constraint

        public Constraint​(double[] Aj,
                          ConsType rel,
                          double rhs)
                   throws LPException
        Parameters:
        Aj - The LHS part of the j-th constraint of the problem
        rel - The type of constraint/relation (EQ, LE, GE, UPPER, LOWER, INT, BIN, SEMICONT)
        rhs - The RHS part of the constraint or coefficient bj
        Throws:
        LPException - If the constraint is not congruent
    • Method Detail

      • getAj

        public double[] getAj()
        Returns:
        The LHS part of the j-th constraint of the problem
      • getRel

        public ConsType getRel()
        Returns:
        The type of constraint (relation) defined (EQ, LE, GE)
      • getRhs

        public double getRhs()
        Returns:
        The RHS part of the constraint or coefficient bj