fixed bug in NSGA-II, only niching on last objective
This commit is contained in:
parent
5f9b1a9bfd
commit
283026ed5c
1 changed files with 2 additions and 2 deletions
|
|
@ -480,8 +480,8 @@ class eoNDSorting_II : public eoNDSorting<EOT>
|
||||||
double max_dist = *std::max_element(nc.begin(), nc.end());
|
double max_dist = *std::max_element(nc.begin(), nc.end());
|
||||||
|
|
||||||
// set boundary at max_dist + 1 (so it will get chosen over all the others
|
// set boundary at max_dist + 1 (so it will get chosen over all the others
|
||||||
nc[performance[0].second] = max_dist + 1;
|
nc[performance[0].second] += max_dist + 1;
|
||||||
nc[performance.back().second] = max_dist + 1;
|
nc[performance.back().second] += max_dist + 1;
|
||||||
|
|
||||||
for (i = 0; i < nc.size(); ++i)
|
for (i = 0; i < nc.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Reference in a new issue