Package edu.jas.application
Class IntegerProgram
- java.lang.Object
-
- edu.jas.application.IntegerProgram
-
- All Implemented Interfaces:
java.io.Serializable
public class IntegerProgram extends java.lang.Object implements java.io.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.- Author:
- Maximilian Nohr
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntegerProgram()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetSuccess()voidsetDebug(boolean b)Set debug flag to parameter value.long[]solve(long[] B)Solve Integer Program for new right hand side.long[]solve(long[][] A, long[] B, long[] C)Solve Integer Program.java.lang.StringtoString()
-
-
-
Constructor Detail
-
IntegerProgram
public IntegerProgram()
Constructor. Use one instance for every new problem since solve() is not reentrant.
-
-
Method Detail
-
setDebug
public void setDebug(boolean b)
Set debug flag to parameter value.- Parameters:
b-
-
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 restrictionsB- restrictions right hand sideC- 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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-