Class IntegerProgram

java.lang.Object
edu.jas.application.IntegerProgram
All Implemented Interfaces:
Serializable

public class IntegerProgram extends Object implements Serializable
Solution of Integer Programming problems using Groebner bases. Integer Program is in standard form -> minimization of given Equation plus restrictions. See chapter 8 in Cox, Little, O'Shea "Using Algebraic Geometry", 1998.
See Also:
  • Field Details

  • Constructor Details

    • IntegerProgram

      public IntegerProgram()
      Constructor. Use one instance for every new problem since solve() is not reentrant.
  • Method Details

    • setDebug

      public void setDebug(boolean b)
      Set debug flag to parameter value.
      Parameters:
      b -
    • createIdeal

      private void createIdeal()
    • getSuccess

      public boolean getSuccess()
      Returns:
      true if the last calculation had a solution, else false
    • solve

      public long[] solve(long[][] A, long[] B, long[] C)
      Solve Integer Program.
      Parameters:
      A - matrix of restrictions
      B - restrictions right hand side
      C - objective function
      Returns:
      solution s, such that s*C -> minimal and A*s = B, or s = null if no solution exists
    • solve

      public long[] solve(long[] B)
      Solve Integer Program for new right hand side. Uses the GB (matrix A and C) from the last calculation.
      Parameters:
      B - restrictions right hand side
      Returns:
      solution s, such that s*C -> minimal and A*s = B, or s = null if no solution exists
    • setDeg

      private void setDeg()
    • setTO

      private void setTO()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • negVarTest

      private boolean negVarTest()
    • findMin

      private long findMin(long[] B)