Dynamic NSGA-II

Example

[ ]:
from jmetal.algorithm.multiobjective.nsgaii import DynamicNSGAII
from jmetal.operator.crossover import SBXCrossover
from jmetal.operator.mutation import PolynomialMutation
from jmetal.problem.multiobjective.fda import FDA2
from jmetal.util.observable import TimeCounter
from jmetal.util.observer import PlotFrontToFileObserver, WriteFrontToFileObserver
from jmetal.util.termination_criterion import StoppingByEvaluations

problem = FDA2()

time_counter = TimeCounter(delay=1)
time_counter.observable.register(problem)
time_counter.start()

max_evaluations = 25000
algorithm = DynamicNSGAII(
    problem=problem,
    population_size=100,
    offspring_population_size=100,
    mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables, distribution_index=20),
    crossover=SBXCrossover(probability=1.0, distribution_index=20),
    termination_criterion=StoppingByEvaluations(max=max_evaluations)
)

algorithm.observable.register(observer=PlotFrontToFileObserver('front_plot'))
algorithm.observable.register(observer=WriteFrontToFileObserver('front_files'))

algorithm.run()

API

class jmetal.algorithm.multiobjective.nsgaii.DynamicNSGAII(problem: ~jmetal.core.problem.DynamicProblem[~jmetal.algorithm.multiobjective.nsgaii.S], population_size: int, offspring_population_size: int, mutation: ~jmetal.core.operator.Mutation, crossover: ~jmetal.core.operator.Crossover, selection: ~jmetal.core.operator.Selection = <jmetal.operator.selection.BinaryTournamentSelection object>, termination_criterion: ~jmetal.util.termination_criterion.TerminationCriterion = <jmetal.util.termination_criterion.StoppingByEvaluations object>, population_generator: ~typing.Generator = <jmetal.util.generator.RandomGenerator object>, population_evaluator: ~jmetal.util.evaluator.Evaluator = <jmetal.util.evaluator.SequentialEvaluator object>, dominance_comparator: ~jmetal.util.comparator.DominanceComparator = <jmetal.util.comparator.DominanceComparator object>)[source]

Bases: NSGAII[S, R], DynamicAlgorithm

restart()[source]
stopping_condition_is_met()[source]

The stopping condition is met or not.

update_progress()[source]

Update the progress after each iteration.