From 25abf169fdb33a1163ecdaf5511691defbcf0960 Mon Sep 17 00:00:00 2001 From: Julian Blank Date: Mon, 11 Dec 2023 19:06:57 -0800 Subject: [PATCH] Bugfix: Argument order in NSGA3 normalization of "worst_of_population" and "worst_of_front" --- pymoo/algorithms/moo/nsga3.py | 3 +-- pymoo/algorithms/soo/nonconvex/pattern.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pymoo/algorithms/moo/nsga3.py b/pymoo/algorithms/moo/nsga3.py index f2d714895..b17ce8df0 100644 --- a/pymoo/algorithms/moo/nsga3.py +++ b/pymoo/algorithms/moo/nsga3.py @@ -278,7 +278,6 @@ def __init__(self, n_dim) -> None: self.extreme_points = None def update(self, F, nds=None): - # find or usually update the new ideal point - from feasible solutions self.ideal_point = np.min(np.vstack((self.ideal_point, F)), axis=0) self.worst_point = np.max(np.vstack((self.worst_point, F)), axis=0) @@ -296,7 +295,7 @@ def update(self, F, nds=None): worst_of_front = np.max(F[nds, :], axis=0) self.nadir_point = get_nadir_point(self.extreme_points, self.ideal_point, self.worst_point, - worst_of_population, worst_of_front) + worst_of_front, worst_of_population) def get_extreme_points_c(F, ideal_point, extreme_points=None): diff --git a/pymoo/algorithms/soo/nonconvex/pattern.py b/pymoo/algorithms/soo/nonconvex/pattern.py index 370caff92..61edc4ad5 100644 --- a/pymoo/algorithms/soo/nonconvex/pattern.py +++ b/pymoo/algorithms/soo/nonconvex/pattern.py @@ -80,7 +80,7 @@ def _initialize_advance(self, infills=None, **kwargs): def _next(self): # whether the last iteration has resulted in a new optimum or not - has_improved = is_better(self._explr, self._center, eps=0.0) + has_improved = is_better(self._explr, self._center) # that means that the exploration did not find any new point and was thus unsuccessful if not has_improved: