Skip to content

Commit

Permalink
Bugfix: Argument order in NSGA3 normalization of "worst_of_population…
Browse files Browse the repository at this point in the history
…" and "worst_of_front"
  • Loading branch information
blankjul committed Dec 12, 2023
1 parent 82a5189 commit 25abf16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pymoo/algorithms/moo/nsga3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pymoo/algorithms/soo/nonconvex/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

1 comment on commit 25abf16

@blankjul
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Credits to @dkim-coder for findings this.

Please sign in to comment.