Skip to content

Commit

Permalink
Merge pull request #377 from daytime001/dev
Browse files Browse the repository at this point in the history
Fix duplicate solutions in the final Pareto solution set and address issues with blank Pareto front plots in newer versions of matplotlib.
  • Loading branch information
geatpy-dev committed Sep 20, 2024
2 parents 86db7e7 + 89169cf commit a48a6e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions geatpy/Algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ def finishing(self, pop, globalNDSet=None):
NDSet = pop[np.where(levels == 1)[0]] # 只保留种群中的非支配个体,形成一个非支配种群
if NDSet.CV is not None: # CV不为None说明有设置约束条件
NDSet = NDSet[np.where(np.all(NDSet.CV <= 0, 1))[0]] # 最后要彻底排除非可行解
# 排除重复解
NDSet = NDSet[np.unique(NDSet.ObjV,return_index=True,axis=0)[1]]
else:
NDSet = globalNDSet
if self.logTras != 0 and NDSet.sizes != 0 and (
Expand Down

0 comments on commit a48a6e7

Please sign in to comment.