From 06f09c39800c5d55fd4aadff19b764773a3fdee5 Mon Sep 17 00:00:00 2001 From: JoD Date: Wed, 28 Jun 2023 00:07:14 +0200 Subject: [PATCH] Exact does not support solveAll with objective --- cpmpy/solvers/exact.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpmpy/solvers/exact.py b/cpmpy/solvers/exact.py index 6414c5b32..5ab3f7cd0 100644 --- a/cpmpy/solvers/exact.py +++ b/cpmpy/solvers/exact.py @@ -33,6 +33,7 @@ from ..transformations.reification import only_bv_implies, reify_rewrite from ..transformations.normalize import toplevel_list from ..expressions.globalconstraints import DirectConstraint +from ..exceptions import NotSupportedError import numpy as np import numbers @@ -215,7 +216,7 @@ def solveAll(self, display=None, time_limit=None, solution_limit=None, call_from Returns: number of solutions found """ if self.objective_given: - raise NotImplementedError("Exact does not yet support finding all *optimal* solutions.") + raise NotSupportedError("Exact does not support finding all optimal solutions.") if not self.solver_is_initialized: # NOTE: initialization of exact is also how it fixes the objective function.