Class LPConstraint

java.lang.Object
org.drip.optimization.canonical.LPConstraint
All Implemented Interfaces:
LinearConstraint

public class LPConstraint
extends java.lang.Object
implements LinearConstraint
LPConstraint holds the Constraint Matrix LHS and Constraint Array RHS for an Linear Program Ax lte B, where A is Rm x n, B is Rm, and x is R+n. The References are:

  • Nering, E. D., and A. W. Tucker (1993): Linear Programs and Related Problems Academic Press
  • Murty, K. G. (1983): Linear Programming John Wiley and Sons New York
  • Padberg, M. W. (1999): Linear Optimization and Extensions 2nd Edition Springer-Verlag
  • van der Bei, R. J. (2008): Linear Programming: Foundations and Extensions 3rd Edition International Series in Operations Research and Management Science 114 Springer-Verlag
  • Wikipedia (2020): Simplex Algorithm https://en.wikipedia.org/wiki/Simplex_algorithm


Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    LPConstraint​(double[][] aGrid, double[] bArray)
    LPConstraint Constructor
  • Method Summary

    Modifier and Type Method Description
    double[][] aGrid()
    Retrieve "A" Grid
    double[] bArray()
    Retrieve "b" Array
    int constraintCount()
    Retrieve the Constraint Count
    int dimension()
    Retrieve the Variate Dimension
    boolean validate​(double[] variateArray)
    Validate the Variate Input
    boolean verify​(double[] variateArray)
    Verify if the Variate Array satisfies the Constraint

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LPConstraint

      public LPConstraint​(double[][] aGrid, double[] bArray) throws java.lang.Exception
      LPConstraint Constructor
      Parameters:
      aGrid - "A" Constraint Grid
      bArray - "b" Constraint Array
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • aGrid

      public double[][] aGrid()
      Retrieve "A" Grid
      Returns:
      A Grid
    • bArray

      public double[] bArray()
      Retrieve "b" Array
      Returns:
      b Array
    • constraintCount

      public int constraintCount()
      Description copied from interface: LinearConstraint
      Retrieve the Constraint Count
      Specified by:
      constraintCount in interface LinearConstraint
      Returns:
      Constraint Count
    • dimension

      public int dimension()
      Description copied from interface: LinearConstraint
      Retrieve the Variate Dimension
      Specified by:
      dimension in interface LinearConstraint
      Returns:
      Variate Dimension
    • validate

      public boolean validate​(double[] variateArray)
      Validate the Variate Input
      Parameters:
      variateArray - The Input Variate Array
      Returns:
      TRUE - The Input Variate successfully Validated
    • verify

      public boolean verify​(double[] variateArray) throws java.lang.Exception
      Verify if the Variate Array satisfies the Constraint
      Parameters:
      variateArray - The Input Variate Array
      Returns:
      TRUE - The Variate Array satisfies the Constraint
      Throws:
      java.lang.Exception - Thrown if the Verification cannot be done