From 11d5917f2b37f1c51096df1f780a327c3c438350 Mon Sep 17 00:00:00 2001 From: Johannes Mey <johannes.mey@tu-dresden.de> Date: Wed, 29 Aug 2018 18:01:24 +0200 Subject: [PATCH] add missing call to cleanup --- .../inf/st/mquat/solving/ilp/AbstractILPSolver.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/AbstractILPSolver.java b/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/AbstractILPSolver.java index 0127a8d..bebf937 100644 --- a/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/AbstractILPSolver.java +++ b/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/AbstractILPSolver.java @@ -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); } -- GitLab