diff --git a/jmetal/algorithm/test/ittest_algorithm.py b/jmetal/algorithm/test/ittest_algorithm.py index f214b774..beecb753 100644 --- a/jmetal/algorithm/test/ittest_algorithm.py +++ b/jmetal/algorithm/test/ittest_algorithm.py @@ -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): @@ -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), ) @@ -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), )