Commit 11d5917f authored by Johannes Mey's avatar Johannes Mey
Browse files

add missing call to cleanup

parent ee628630
......@@ -65,16 +65,20 @@ public abstract class AbstractILPSolver implements BenchmarkableSolver {
@Override
public synchronized Solution solve(Root model) throws SolvingException {
reset();
StopWatch watch = StopWatch.start();
if (model.getNumRequest() == 0) {
lastGeneration = watch.time(TimeUnit.MILLISECONDS);
cleanup(watch);
return Solution.emptySolutionOf(model);
}
StopWatch watch = StopWatch.start();
final ILP ilp = model.getILP();
lastGeneration = watch.time(TimeUnit.MILLISECONDS);
logger.debug("ILP-Generation took {}ms.", lastGeneration);
if (ilp.hasTimeout()) {
logger.error("ILP-Generation exceeded timeout, message: '{}'", ilp.timeoutReason());
cleanup(watch);
return Solution.emptySolutionOf(model);
}
......
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