diff options
author | 2021-02-07 04:54:42 +0100 | |
---|---|---|
committer | 2021-02-07 04:54:42 +0100 | |
commit | 9f02e7e2fe8b3e347f3d05e8d0751dec016842cd (patch) | |
tree | 6d0c34c617ed51c9c9715f3ec18552425656b3a5 /Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java | |
parent | Remove dreal (diff) | |
download | VIATRA-Generator-9f02e7e2fe8b3e347f3d05e8d0751dec016842cd.tar.gz VIATRA-Generator-9f02e7e2fe8b3e347f3d05e8d0751dec016842cd.tar.zst VIATRA-Generator-9f02e7e2fe8b3e347f3d05e8d0751dec016842cd.zip |
measurement setup is ready for server
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java index 4fef6448..e0ebcb6b 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/NumericDrealProblemSolver.java | |||
@@ -43,7 +43,8 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
43 | private Map<String, String> curVar2Decl; | 43 | private Map<String, String> curVar2Decl; |
44 | 44 | ||
45 | private final int TIMEOUT_DOCKER = 5000; | 45 | private final int TIMEOUT_DOCKER = 5000; |
46 | private final int TIMEOUT_LOCAL = 20000; | 46 | private final int TIMEOUT_LOCAL = 10000; |
47 | private final boolean DEBUG_PRINT = false; | ||
47 | 48 | ||
48 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath) throws IOException, InterruptedException { | 49 | public NumericDrealProblemSolver(boolean useDocker, String drealLocalPath) throws IOException, InterruptedException { |
49 | this.useDocker = useDocker; | 50 | this.useDocker = useDocker; |
@@ -86,8 +87,10 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
86 | } | 87 | } |
87 | return null; | 88 | return null; |
88 | } | 89 | } |
89 | double duration = (double) (System.nanoTime() - startTime) / 1000000000; | 90 | if (DEBUG_PRINT) { |
90 | System.out.println("Dur = " + duration + " : "); | 91 | double duration = (double) (System.nanoTime() - startTime) / 1000000000; |
92 | System.out.println("Dur = " + duration + " : "); | ||
93 | } | ||
91 | return p; | 94 | return p; |
92 | } | 95 | } |
93 | 96 | ||
@@ -397,17 +400,15 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
397 | } | 400 | } |
398 | endSolvingProblem = System.nanoTime()-startSolvingProblem; | 401 | endSolvingProblem = System.nanoTime()-startSolvingProblem; |
399 | 402 | ||
400 | //DEBUG - Print things | 403 | if (outputProcess == null) { |
401 | if (outputProcess == null) { | ||
402 | |||
403 | System.err.println("TIMEOUT"); | 404 | System.err.println("TIMEOUT"); |
404 | // printOutput(numProbContent); | 405 | // printOutput(numProbContent); |
405 | } | 406 | } |
406 | 407 | if (DEBUG_PRINT) { | |
407 | // printOutput(numProbContent); | 408 | // printOutput(numProbContent); |
408 | // if (outputs != null) printOutput(outputs.get(0)); | 409 | // if (outputs != null) printOutput(outputs.get(0)); |
409 | System.out.println(result); | 410 | System.out.println(result); |
410 | // END DEBUG | 411 | } |
411 | 412 | ||
412 | return result; | 413 | return result; |
413 | } | 414 | } |
@@ -459,12 +460,12 @@ public class NumericDrealProblemSolver extends NumericProblemSolver{ | |||
459 | boolean result = getDrealResult(outputProcess.exitValue(), outputs); | 460 | boolean result = getDrealResult(outputProcess.exitValue(), outputs); |
460 | endSolvingProblem = System.nanoTime()-startSolvingProblem; | 461 | endSolvingProblem = System.nanoTime()-startSolvingProblem; |
461 | 462 | ||
462 | //DEBUG - Print things | 463 | if (DEBUG_PRINT) { |
463 | System.out.println("Getting Solution!"); | 464 | System.out.println("Getting Solution!"); |
464 | // printOutput(numProbContent); | 465 | // printOutput(numProbContent); |
465 | // printOutput(outputs.get(0)); | 466 | // printOutput(outputs.get(0)); |
466 | // System.out.println(result); | 467 | // System.out.println(result); |
467 | //END DEBUG | 468 | } |
468 | 469 | ||
469 | //GET SOLUTION | 470 | //GET SOLUTION |
470 | if (result) { | 471 | if (result) { |