diff options
author | 2019-07-29 14:21:36 +0200 | |
---|---|---|
committer | 2019-07-29 14:21:36 +0200 | |
commit | b4bf8d387e430600790f6b30d9e88ec785148cd7 (patch) | |
tree | fdf6df1437823c9880b031405be498782109fdd8 /Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java | |
parent | Parse rational numbers in Z3PolyhedronSolver (diff) | |
download | VIATRA-Generator-b4bf8d387e430600790f6b30d9e88ec785148cd7.tar.gz VIATRA-Generator-b4bf8d387e430600790f6b30d9e88ec785148cd7.tar.zst VIATRA-Generator-b4bf8d387e430600790f6b30d9e88ec785148cd7.zip |
Make CbcPolyhedronSolver more robust
Diffstat (limited to 'Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java')
-rw-r--r-- | Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java b/Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java index 39b9d537..085d4448 100644 --- a/Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java +++ b/Solvers/ILP-Solver/hu.bme.mit.inf.dslreasoner.ilp.cbc/src/hu/bme/mit/inf/dslreasoner/ilp/cbc/CbcSolver.java | |||
@@ -15,14 +15,14 @@ public class CbcSolver { | |||
15 | } | 15 | } |
16 | 16 | ||
17 | public static CbcResult solve(double[] columnLowerBounds, double[] columnUpperBounds, int[] rowStarts, | 17 | public static CbcResult solve(double[] columnLowerBounds, double[] columnUpperBounds, int[] rowStarts, |
18 | int[] columnIndices, double[] entries, double[] rowLowerBounds, double[] rowUpperBounds, | 18 | int[] columnIndices, double[] entries, double[] rowLowerBounds, double[] rowUpperBounds, double[] objective, |
19 | double[] objective, double timeoutSeconds, boolean silent) { | 19 | boolean lpRelaxation, double timeoutSeconds, boolean silent) { |
20 | loadNatives(); | 20 | loadNatives(); |
21 | validate(columnLowerBounds, columnUpperBounds, rowStarts, columnIndices, entries, rowLowerBounds, | 21 | validate(columnLowerBounds, columnUpperBounds, rowStarts, columnIndices, entries, rowLowerBounds, |
22 | rowUpperBounds, objective); | 22 | rowUpperBounds, objective); |
23 | double[] output = new double[1]; | 23 | double[] output = new double[1]; |
24 | int result = solveIlpProblem(columnLowerBounds, columnUpperBounds, rowStarts, columnIndices, entries, | 24 | int result = solveIlpProblem(columnLowerBounds, columnUpperBounds, rowStarts, columnIndices, entries, |
25 | rowLowerBounds, rowUpperBounds, objective, output, timeoutSeconds, silent); | 25 | rowLowerBounds, rowUpperBounds, objective, output, lpRelaxation, timeoutSeconds, silent); |
26 | if (result == CBC_SOLUTION_BOUNDED) { | 26 | if (result == CBC_SOLUTION_BOUNDED) { |
27 | return new CbcResult.SolutionBounded(output[0]); | 27 | return new CbcResult.SolutionBounded(output[0]); |
28 | } else if (result == CBC_SOLUTION_UNBOUNDED) { | 28 | } else if (result == CBC_SOLUTION_UNBOUNDED) { |
@@ -67,5 +67,5 @@ public class CbcSolver { | |||
67 | 67 | ||
68 | private static native int solveIlpProblem(double[] columnLowerBounds, double[] columnUpperBounds, int[] rowStarts, | 68 | private static native int solveIlpProblem(double[] columnLowerBounds, double[] columnUpperBounds, int[] rowStarts, |
69 | int[] columnIndices, double[] entries, double[] rowLowerBounds, double[] rowUpperBounds, double[] objective, | 69 | int[] columnIndices, double[] entries, double[] rowLowerBounds, double[] rowUpperBounds, double[] objective, |
70 | double[] output, double timeoutSeconds, boolean silent); | 70 | double[] output, boolean lpRelaxation, double timeoutSeconds, boolean silent); |
71 | } | 71 | } |