Skip to content

Commit

Permalink
Fix bug in ibea.
Browse files Browse the repository at this point in the history
  • Loading branch information
12yuens2 committed Mar 11, 2020
1 parent 6f54940 commit ea8e426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jmetal/algorithm/multiobjective/ibea.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def compute_fitness_values(self, population: List[S], kappa: float) -> List[S]:
for j in range(len(population)):
if j != i:
population[i].attributes['fitness'] += -np.exp(
-EpsilonIndicator([population[i]]).compute([population[j]]) / self.kappa)
-EpsilonIndicator([population[i].objectives]).compute([population[j].objectives]) / self.kappa)
return population

def create_initial_solutions(self) -> List[S]:
Expand All @@ -92,7 +92,7 @@ def replacement(self, population: List[S], offspring_population: List[S]) -> Lis

for i in range(join_population_size):
join_population[i].attributes['fitness'] += np.exp(
- EpsilonIndicator([join_population[i]]).compute([join_population[index_worst]]) / self.kappa)
- EpsilonIndicator([join_population[i].objectives]).compute([join_population[index_worst].objectives]) / self.kappa)

join_population.pop(index_worst)
join_population_size = join_population_size - 1
Expand Down

0 comments on commit ea8e426

Please sign in to comment.