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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long[][]
A
(package private) long[][]
Aa
(package private) long[]
B
(package private) long[]
C
(package private) long[]
D
private static boolean
debug
(package private) PolynomialList<BigInteger>
F
(package private) Ideal<BigInteger>
GB
(package private) Ideal<BigInteger>
I
private static org.apache.logging.log4j.Logger
logger
(package private) int
m
(package private) int
n
private boolean
negVars
(package private) GenPolynomial<BigInteger>
S
private boolean
success
(package private) TermOrder
to
-
Constructor Summary
Constructors Constructor Description IntegerProgram()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createIdeal()
private long
findMin(long[] B)
boolean
getSuccess()
private boolean
negVarTest()
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.java.lang.String
toString()
-
-
-
Field Detail
-
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
PolynomialList<BigInteger> F
-
S
GenPolynomial<BigInteger> S
-
-
Method Detail
-
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
negVarTest
private boolean negVarTest()
-
findMin
private long findMin(long[] B)
-
-