Commit ee628630 authored by Johannes Mey's avatar Johannes Mey
Browse files

add some debug output for external solver.

parent fb3eda51
......@@ -110,12 +110,15 @@ public class ILPExternalSolver extends AbstractILPSolver {
throw new SolvingException("Interrupted while waiting for result", e);
StopWatch writerWatch = StopWatch.start();
if (!finishedInTime) {
// solver already had a timeout, so wait some seconds longer to let it write a solution file
this.timedOut = true;
try {
process.waitFor(10, TimeUnit.SECONDS);
logger.debug("Solver had a timeout, waiting ten seconds to let it write the result.");
process.waitFor(60, TimeUnit.SECONDS);
} catch (InterruptedException ignored) { }
logger.debug("Solver took {} seconds to write the result.", writerWatch.time(TimeUnit.SECONDS));
// then destroy the process
if (!solutionReadable.toAbsolutePath().toFile().exists()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment