Class BaseNSGAII<S extends org.uma.jmetal.solution.Solution<?>>

java.lang.Object
org.uma.evolver.algorithm.base.nsgaii.BaseNSGAII<S>
Type Parameters:
S - the type of solutions handled by this algorithm, must extend Solution
All Implemented Interfaces:
BaseLevelAlgorithm<S>
Direct Known Subclasses:
BinaryNSGAII, DoubleNSGAII, PermutationNSGAII

public abstract class BaseNSGAII<S extends org.uma.jmetal.solution.Solution<?>> extends Object implements BaseLevelAlgorithm<S>
Abstract base class for configurable NSGA-II (Non-dominated Sorting Genetic Algorithm II) implementations.

This class provides a flexible and extensible foundation for building NSGA-II variants for different solution types. It manages the configuration and assembly of the main algorithmic components (selection, variation, replacement, evaluation, termination, etc.) using a parameter space abstraction. NSGA-II is a fast and elitist multi-objective genetic algorithm that uses a non-dominated sorting approach with crowding distance for maintaining diversity.

Key features of this implementation include:

  • Fast non-dominated sorting for ranking solutions
  • Crowding distance calculation for diversity preservation
  • Configurable selection, crossover, and mutation operators
  • Support for external archives
  • Flexible termination conditions

Subclasses must implement the setNonConfigurableParameters() method to set any parameters that are fixed or derived from the problem instance.

Typical usage involves:

  • Creating a concrete subclass for a specific solution type (e.g., permutation, double)
  • Configuring the parameter space and problem instance
  • Calling build() to obtain a ready-to-run EvolutionaryAlgorithm instance

Example usage:


 // Create a problem instance
 Problem<MySolution> problem = new MyProblem();

 // Configure the algorithm
 int populationSize = 100;
 int maxEvaluations = 25000;
 ParameterSpace parameterSpace = new ParameterSpace();
 // Configure parameter space with desired components and parameters

 // Create and run the algorithm
 BaseNSGAII<MySolution> nsgaii = new MyNSGAII(problem, populationSize, maxEvaluations, parameterSpace);
 nsgaii.run();

 // Get results
 List<MySolution> population = nsgaii.result();
 
Since:
version
See Also: