Skip to content

Commit

Permalink
Merge pull request #170 from kwdrt/patch-1
Browse files Browse the repository at this point in the history
Update README.md - reflect API changes in example code
  • Loading branch information
ajnebro authored May 13, 2024
2 parents ee2e0e0 + 3a75a66 commit db90e23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ algorithm = NSGAII(
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=25000)
)
Expand All @@ -81,7 +81,7 @@ We can then proceed to explore the results:
from jmetal.util.solution import get_non_dominated_solutions, print_function_values_to_file,
print_variables_to_file

front = get_non_dominated_solutions(algorithm.result())
front = get_non_dominated_solutions(algorithm.get_result())

# save to files
print_function_values_to_file(front, 'FUN.NSGAII.ZDT1')
Expand Down Expand Up @@ -128,4 +128,4 @@ The current release of jMetalPy (v1.7.0) contains the following components:

## License

This project is licensed under the terms of the MIT - see the [LICENSE](LICENSE) file for details.
This project is licensed under the terms of the MIT - see the [LICENSE](LICENSE) file for details.

0 comments on commit db90e23

Please sign in to comment.