Class PermutationNSGAII
- All Implemented Interfaces:
BaseLevelAlgorithm<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>>
This class extends the base BaseNSGAII implementation to handle permutation-encoded
solutions, providing specialized support for combinatorial optimization problems where solutions
are represented as permutations of integers.
Key features include:
- Support for permutation-based solution spaces
- Configurable genetic operators through the parameter space
- Specialized support for permutation-specific operators
- Integration with JMetal's permutation solution interface
Example usage:
// Create a permutation problem instance (e.g., TSP)
PermutationProblem<Integer> problem = new TSP(...);
// Configure the algorithm
int populationSize = 100;
int maxEvaluations = 25000;
ParameterSpace parameterSpace = new ParameterSpace();
// Configure parameter space with desired operators and parameters
// Create and run the algorithm
PermutationNSGAII algorithm = new PermutationNSGAII(problem, populationSize, maxEvaluations, parameterSpace);
algorithm.run();
// Get results
List<PermutationSolution<Integer>> population = algorithm.result();
The algorithm is particularly well-suited for combinatorial optimization problems such as the Traveling Salesman Problem (TSP), Quadratic Assignment Problem (QAP), and other permutation-based optimization tasks.
- Since:
- version
- See Also:
-
Field Summary
Fields inherited from class org.uma.evolver.algorithm.base.nsgaii.BaseNSGAII
densityEstimator, externalArchive, maximumNumberOfEvaluations, offspringPopulationSize, parameterSpace, populationSize, problem, ranking, rankingAndCrowdingComparator -
Constructor Summary
ConstructorsConstructorDescriptionPermutationNSGAII(int populationSize, ParameterSpace parameterSpace) Constructs a new instance of PermutationNSGAII with the specified population size and parameter space.PermutationNSGAII(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> problem, int populationSize, int maximumNumberOfEvaluations, ParameterSpace parameterSpace) Constructs a fully configured PermutationNSGAII instance ready for execution. -
Method Summary
Modifier and TypeMethodDescriptionBaseLevelAlgorithm<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> createInstance(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> problem, int maximumNumberOfEvaluations) Creates and returns a new instance of PermutationNSGAII configured for the specified problem.protected voidConfigures non-configurable parameters based on the problem's characteristics.Methods inherited from class org.uma.evolver.algorithm.base.nsgaii.BaseNSGAII
build, createEvaluation, createExternalArchive, createInitialSolutions, createReplacement, createSelection, createTermination, createVariation, parameterSpaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.uma.evolver.algorithm.base.BaseLevelAlgorithm
parse
-
Constructor Details
-
PermutationNSGAII
Constructs a new instance of PermutationNSGAII with the specified population size and parameter space.Note: This creates a partially configured instance. The
createInstance(Problem, int)method must be called with a problem instance before the algorithm can be used.- Parameters:
populationSize- the size of the population to be used in the algorithm. Must be positive.parameterSpace- the parameter space containing configuration parameters for the algorithm. Must not be null.- Throws:
IllegalArgumentException- if populationSize is not positive or parameterSpace is null
-
PermutationNSGAII
public PermutationNSGAII(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> problem, int populationSize, int maximumNumberOfEvaluations, ParameterSpace parameterSpace) Constructs a fully configured PermutationNSGAII instance ready for execution.- Parameters:
problem- the permutation-based optimization problem to be solved. Must implement the PermutationProblem interface.populationSize- the size of the population. Must be a positive integer.maximumNumberOfEvaluations- the evaluation budget for the algorithm. The algorithm will terminate once this number of evaluations is reached.parameterSpace- the parameter space containing configuration parameters for the algorithm.- Throws:
IllegalArgumentException- if any parameter is invalid (null or non-positive values where required)ClassCastException- if the provided problem does not implement PermutationProblem
-
-
Method Details
-
createInstance
public BaseLevelAlgorithm<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> createInstance(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>> problem, int maximumNumberOfEvaluations) Creates and returns a new instance of PermutationNSGAII configured for the specified problem.This method implements the factory method pattern, allowing the creation of algorithm instances with the same configuration but potentially different problems or evaluation limits.
- Parameters:
problem- the permutation-based optimization problem to solve. Must not be null.maximumNumberOfEvaluations- the maximum number of evaluations allowed for the new instance. Must be positive.- Returns:
- a new, fully configured instance of PermutationNSGAII
- Throws:
IllegalArgumentException- if problem is null or maximumNumberOfEvaluations is not positive
-
setNonConfigurableParameters
protected void setNonConfigurableParameters()Configures non-configurable parameters based on the problem's characteristics.This method is automatically called during algorithm initialization. For the permutation-based NSGA-II implementation, no additional non-configurable parameters need to be set as all required parameters are handled by the base class or through the parameter space configuration.
- Specified by:
setNonConfigurableParametersin classBaseNSGAII<org.uma.jmetal.solution.permutationsolution.PermutationSolution<Integer>>
-