Package edu.jas.application
Class IntegerProgram
java.lang.Object
edu.jas.application.IntegerProgram
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescription(package private) long[][]
(package private) long[][]
(package private) long[]
(package private) long[]
(package private) long[]
private static boolean
(package private) PolynomialList
<BigInteger> (package private) Ideal
<BigInteger> (package private) Ideal
<BigInteger> private static final org.apache.logging.log4j.Logger
(package private) int
(package private) int
private boolean
(package private) GenPolynomial
<BigInteger> private boolean
(package private) TermOrder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private long
findMin
(long[] B) boolean
private boolean
void
setDebug
(boolean b) Set debug flag to parameter value.private void
setDeg()
private void
setTO()
long[]
solve
(long[] B) Solve Integer Program for new right hand side.long[]
solve
(long[][] A, long[] B, long[] C) Solve Integer Program.toString()
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static boolean debug -
negVars
private boolean negVars -
success
private boolean success -
n
int n -
m
int m -
C
long[] C -
B
long[] B -
A
long[][] A -
D
long[] D -
Aa
long[][] Aa -
I
Ideal<BigInteger> I -
GB
Ideal<BigInteger> GB -
to
TermOrder to -
F
-
S
-
-
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 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
-
setDeg
private void setDeg() -
setTO
private void setTO() -
toString
-
negVarTest
private boolean negVarTest() -
findMin
private long findMin(long[] B)
-