Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes final use of deprecated .feasible attribute. #681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pymoo/core/replacement.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@


def is_better(_new, _old, eps=0.0):
both_infeasible = not _old.feasible[0] and not _new.feasible[0]
both_feasible = _old.feasible[0] and _new.feasible[0]
both_infeasible = not _old.feas and not _new.feas
both_feasible = _old.feas and _new.feas

if both_infeasible and _old.CV[0] - _new.CV[0] > eps:
return True
elif not _old.feasible and _new.feasible:
elif not _old.FEAS and _new.FEAS:
return True
elif both_feasible and _old.F[0] - _new.F[0] > eps:
return True
Expand Down