From edabb38b8591caee46e2d3129ab7a41f1df4760e Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:04:02 +0900 Subject: [PATCH] Update recipes/007_benchmarks_advanced.py Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com> --- recipes/007_benchmarks_advanced.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/007_benchmarks_advanced.py b/recipes/007_benchmarks_advanced.py index 9374fce..2eb36a5 100644 --- a/recipes/007_benchmarks_advanced.py +++ b/recipes/007_benchmarks_advanced.py @@ -77,7 +77,8 @@ def evaluate_constraints(self, params: dict[str, float]) -> tuple[float]: x = params["x"] c0 = x - 2 if "y" not in params: - return [c0] + c1 = 0.0 # c1 <= 0, so c1 is satisfied in this case. + return c0, c1 else: y = params["y"] c1 = x + y - 3