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 {
@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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment