[1]:
from jmetal.algorithm.multiobjective.gde3 import GDE3
from jmetal.problem import ZDT1
from jmetal.util.termination_criterion import StoppingByEvaluations
problem = ZDT1()
max_evaluations = 25000
algorithm = GDE3(
problem=problem,
population_size=100,
cr=0.5,
f=0.5,
termination_criterion=StoppingByEvaluations(max_evaluations)
)
algorithm.run()
solutions = algorithm.get_result()
We can now visualize the Pareto front approximation:
[3]:
from jmetal.lab.visualization.plotting import Plot
from jmetal.util.solution import get_non_dominated_solutions
front = get_non_dominated_solutions(solutions)
plot_front = Plot(plot_title='Pareto front approximation', axis_labels=['x', 'y'])
plot_front.plot(front, label='GDE3-ZDT1')
Bases: EvolutionaryAlgorithm
[FloatSolution
, FloatSolution
]
Creates the initial list of solutions of a metaheuristic.
Evaluates a solution list.
Replace least-fit population with new individuals.
Breed new individuals through crossover and mutation operations to give birth to offspring.