Skip to content
Snippets Groups Projects
Commit 11d5917f authored by Johannes Mey's avatar Johannes Mey
Browse files

add missing call to cleanup

parent ee628630
No related branches found
No related tags found
No related merge requests found
...@@ -65,16 +65,20 @@ public abstract class AbstractILPSolver implements BenchmarkableSolver { ...@@ -65,16 +65,20 @@ public abstract class AbstractILPSolver implements BenchmarkableSolver {
@Override @Override
public synchronized Solution solve(Root model) throws SolvingException { public synchronized Solution solve(Root model) throws SolvingException {
reset(); reset();
StopWatch watch = StopWatch.start();
if (model.getNumRequest() == 0) { if (model.getNumRequest() == 0) {
lastGeneration = watch.time(TimeUnit.MILLISECONDS);
cleanup(watch);
return Solution.emptySolutionOf(model); return Solution.emptySolutionOf(model);
} }
StopWatch watch = StopWatch.start();
final ILP ilp = model.getILP(); final ILP ilp = model.getILP();
lastGeneration = watch.time(TimeUnit.MILLISECONDS); lastGeneration = watch.time(TimeUnit.MILLISECONDS);
logger.debug("ILP-Generation took {}ms.", lastGeneration); logger.debug("ILP-Generation took {}ms.", lastGeneration);
if (ilp.hasTimeout()) { if (ilp.hasTimeout()) {
logger.error("ILP-Generation exceeded timeout, message: '{}'", ilp.timeoutReason()); logger.error("ILP-Generation exceeded timeout, message: '{}'", ilp.timeoutReason());
cleanup(watch);
return Solution.emptySolutionOf(model); return Solution.emptySolutionOf(model);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment