Class BinaryMOEAD
- All Implemented Interfaces:
BaseLevelAlgorithm<org.uma.jmetal.solution.binarysolution.BinarySolution>
This class provides a customizable version of MOEA/D specifically designed for binary-encoded
optimization problems. It extends the base BaseMOEAD class with binary-specific
configurations and operations.
Features
- Support for binary-encoded solutions
- Configurable crossover and mutation operators for binary representation
- Customizable weight vector generation and neighborhood structures
- Support for various aggregation functions
- Configurable termination conditions and evaluation strategies
Usage Example
// Create and configure the algorithm
BinaryMOEAD algorithm = new BinaryMOEAD(100, "weightVectors/", parameterSpace);
// Parse command line arguments to override default parameters
algorithm.parse(args);
// Build and run the algorithm
EvolutionaryAlgorithm<BinarySolution> moead = algorithm.build();
moead.run();
// Get the resulting non-dominated solutions
List<BinarySolution> result = moead.result();
Configuration Parameters
The algorithm can be configured using the following parameters in the parameter space:
maximumNumberOfReplacedSolutions: Controls how many solutions are replaced in the neighborhoodaggregationFunction: The aggregation function used to combine objectivessequenceGenerator: The sequence generation strategy for weight vectors- And other parameters inherited from
BaseMOEAD
Non-configurable parameters, such as the number of problem variables, maximum number of replaced solutions, and derived values for mutation or neighborhood, are set automatically based on the problem and algorithm configuration.
- See Also:
-
Field Summary
Fields inherited from class org.uma.evolver.algorithm.base.moead.BaseMOEAD
aggregationFunction, maximumNumberOfEvaluations, maximumNumberOfReplacedSolutions, neighborhood, normalizedObjectives, parameterSpace, populationSize, problem, subProblemIdGenerator, weightVectorFilesDirectory -
Constructor Summary
ConstructorsConstructorDescriptionBinaryMOEAD(int populationSize, String weightVectorFilesDirectory, ParameterSpace parameterSpace) Constructs a new BinaryMOEAD instance with the specified population size, weight vector files directory, and parameter space.BinaryMOEAD(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.binarysolution.BinarySolution> problem, int populationSize, int maximumNumberOfEvaluations, String weightVectorFilesDirectory, ParameterSpace parameterSpace) Constructs a fully configured BinaryMOEAD instance ready for execution. -
Method Summary
Modifier and TypeMethodDescriptionBaseLevelAlgorithm<org.uma.jmetal.solution.binarysolution.BinarySolution> createInstance(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.binarysolution.BinarySolution> problem, int maximumNumberOfEvaluations) Creates a new instance of BinaryMOEAD for the given problem and maximum number of evaluations.protected org.uma.jmetal.component.catalogue.ea.variation.Variation<org.uma.jmetal.solution.binarysolution.BinarySolution> Creates and configures the variation operator for binary solutions.protected voidSets non-configurable parameters that depend on the problem or algorithm configuration.Methods inherited from class org.uma.evolver.algorithm.base.moead.BaseMOEAD
build, createEvaluation, createInitialSolutions, createReplacement, createTermination, getNeighborhood, 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
-
BinaryMOEAD
public BinaryMOEAD(int populationSize, String weightVectorFilesDirectory, ParameterSpace parameterSpace) Constructs a new BinaryMOEAD instance with the specified population size, weight vector files directory, and parameter space.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.weightVectorFilesDirectory- the directory containing weight vector files. Must not be null.parameterSpace- the parameter space containing configuration parameters for the algorithm. Must not be null.- Throws:
IllegalArgumentException- if populationSize is not positive or any parameter is null
-
BinaryMOEAD
public BinaryMOEAD(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.binarysolution.BinarySolution> problem, int populationSize, int maximumNumberOfEvaluations, String weightVectorFilesDirectory, ParameterSpace parameterSpace) Constructs a fully configured BinaryMOEAD instance ready for execution.This constructor creates a fully configured instance that can be immediately built and executed. All parameters are validated before the instance is created.
- Parameters:
problem- the optimization problem to be solved. Must not be null.populationSize- the size of the population. Must be positive.maximumNumberOfEvaluations- the maximum number of evaluations allowed for the algorithm. Must be positive and greater than populationSize.weightVectorFilesDirectory- the directory containing weight vector files. Must not be null.parameterSpace- the parameter space containing configuration parameters for the algorithm. Must not be null.- Throws:
IllegalArgumentException- if any parameter is invalid (null or non-positive values where required)IllegalStateException- if the weight vector files cannot be found or parsed
-
-
Method Details
-
createInstance
public BaseLevelAlgorithm<org.uma.jmetal.solution.binarysolution.BinarySolution> createInstance(org.uma.jmetal.problem.Problem<org.uma.jmetal.solution.binarysolution.BinarySolution> problem, int maximumNumberOfEvaluations) Creates a new instance of BinaryMOEAD for the given problem and maximum number of evaluations.This factory method creates a new instance of BinaryMOEAD with the same configuration as this instance but with the specified problem and evaluation budget. The parameter space is cloned to ensure independent configuration.
- Parameters:
problem- the problem to solve. Must not be null.maximumNumberOfEvaluations- the evaluation budget. Must be positive and greater than population size.- Returns:
- a new configured instance of BinaryMOEAD
- Throws:
IllegalArgumentException- if the problem is null or maximumNumberOfEvaluations is invalidIllegalStateException- if the parameter space cannot be cloned
-
setNonConfigurableParameters
protected void setNonConfigurableParameters()Sets non-configurable parameters that depend on the problem or algorithm configuration.This method is automatically called during the build process to configure parameters that cannot be set through the parameter space because they depend on the problem instance or other runtime factors.
This implementation configures:
- The maximum number of solutions to replace in each neighborhood update
- The aggregation function for combining objectives
- Objective normalization settings
- Sequence generation parameters
- Problem-specific parameters for binary encoding
- Specified by:
setNonConfigurableParametersin classBaseMOEAD<org.uma.jmetal.solution.binarysolution.BinarySolution>- Throws:
IllegalStateException- if required parameters are missing or invalid
-
createVariation
protected org.uma.jmetal.component.catalogue.ea.variation.Variation<org.uma.jmetal.solution.binarysolution.BinarySolution> createVariation()Creates and configures the variation operator for binary solutions.This method creates the variation operator (typically a combination of crossover and mutation) that will be used to generate new solutions. The specific operators are retrieved from the parameter space configuration.
The variation operator is responsible for creating new candidate solutions by combining and modifying existing solutions from the population. For binary problems, this typically involves bit-flip mutation and one-point or uniform crossover operations.
- Specified by:
createVariationin classBaseMOEAD<org.uma.jmetal.solution.binarysolution.BinarySolution>- Returns:
- a configured variation operator for binary solutions
- Throws:
IllegalStateException- if the variation operator cannot be created or configured
-