Skip to content

Commit

Permalink
Update file pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnebro committed Sep 2, 2024
1 parent 10cfb5d commit ef6f05a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from jmetal.operator.mutation import CompositeMutation
from jmetal.operator.mutation import IntegerPolynomialMutation, PolynomialMutation
from jmetal.problem.multiobjective.unconstrained import MixedIntegerFloatProblem
from jmetal.util.observer import VisualizerObserver
from jmetal.util.solution import (
get_non_dominated_solutions,
print_function_values_to_file,
Expand All @@ -12,7 +13,7 @@
from jmetal.util.termination_criterion import StoppingByEvaluations

if __name__ == "__main__":
problem = MixedIntegerFloatProblem(10, 10, 100, -100, -1000, 1000)
problem = MixedIntegerFloatProblem(60, 20, 100, -100, -1000, 1000)

max_evaluations = 25000
algorithm = NSGAII(
Expand All @@ -29,6 +30,8 @@
termination_criterion=StoppingByEvaluations(max_evaluations=max_evaluations),
)

algorithm.observable.register(observer=VisualizerObserver())

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if __name__ == "__main__":
problem = ZDT1()
problem.reference_front = read_solutions(filename="resources/reference_front/ZDT1.pf")
reference_front = read_solutions(filename="resources/reference_front/ZDT1.pf")

max_evaluations = 10000
algorithm = NSGAII(
Expand All @@ -30,7 +30,7 @@
)

algorithm.observable.register(observer=ProgressBarObserver(max=max_evaluations))
algorithm.observable.register(observer=VisualizerObserver(reference_front=problem.reference_front))
algorithm.observable.register(observer=VisualizerObserver(reference_front=reference_front))

algorithm.run()
front = algorithm.result()
Expand All @@ -46,7 +46,7 @@
# Plot interactive front
plot_front = InteractivePlot(
title="Pareto front approximation. Problem: " + problem.name(),
reference_front=problem.reference_front,
reference_front=reference_front,
axis_labels=problem.obj_labels,
)
plot_front.plot(front, label=algorithm.label, filename=algorithm.get_name())
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ distributed = [

complete = [
"tqdm",
"numpy>=1.16.0",
"pandas>=0.24.2",
"numpy>=2.0.0",
"pandas>=2.2.0",
"plotly>=3.3.0",
"matplotlib>=3.0.2",
"scipy>=1.3.0",
Expand Down

0 comments on commit ef6f05a

Please sign in to comment.