Skip to content

Commit 8c32b37

Browse files
authored
fixes internal usage of deprecated attribate '.feasible' (#681)
1 parent 1bcbce9 commit 8c32b37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymoo/core/replacement.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88

99
def is_better(_new, _old, eps=0.0):
10-
both_infeasible = not _old.feasible[0] and not _new.feasible[0]
11-
both_feasible = _old.feasible[0] and _new.feasible[0]
10+
both_infeasible = not _old.feas and not _new.feas
11+
both_feasible = _old.feas and _new.feas
1212

1313
if both_infeasible and _old.CV[0] - _new.CV[0] > eps:
1414
return True
15-
elif not _old.feasible and _new.feasible:
15+
elif not _old.FEAS and _new.FEAS:
1616
return True
1717
elif both_feasible and _old.F[0] - _new.F[0] > eps:
1818
return True

0 commit comments

Comments
 (0)