Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnebro committed Jan 22, 2024
1 parent b1de5e5 commit 26fe597
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jmetal/algorithm/test/ittest_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUp(self):
self.offspring_size = 100
self.mating_pool_size = 100
self.max_evaluations = 100
self.mutation = PolynomialMutation(probability=1.0 / self.problem.number_of_variables, distribution_index=20)
self.mutation = PolynomialMutation(probability=1.0 / self.problem.number_of_variables(), distribution_index=20)
self.crossover = SBXCrossover(probability=1.0, distribution_index=20)

def test_NSGAII(self):
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_should_NSGAII_work_when_solving_problem_ZDT1_with_standard_settings(sel
problem=problem,
population_size=100,
offspring_population_size=100,
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables, distribution_index=20),
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables(), distribution_index=20),
crossover=SBXCrossover(probability=1.0, distribution_index=20),
termination_criterion=StoppingByEvaluations(max_evaluations=max_evaluations),
)
Expand All @@ -68,7 +68,7 @@ def test_should_SMPSO_work_when_solving_problem_ZDT1_with_standard_settings(self
algorithm = SMPSO(
problem=problem,
swarm_size=100,
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables, distribution_index=20),
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables(), distribution_index=20),
leaders=CrowdingDistanceArchive(100),
termination_criterion=StoppingByEvaluations(max_evaluations=25000),
)
Expand Down

0 comments on commit 26fe597

Please sign in to comment.