Package org.uma.evolver.algorithm.base
Class ParticleSwarmOptimizationBuilder
java.lang.Object
org.uma.evolver.algorithm.base.ParticleSwarmOptimizationBuilder
A builder class for creating instances of
ParticleSwarmOptimizationAlgorithm with optional archive support.
This builder provides a flexible way to configure and instantiate Particle Swarm Optimization algorithms,
with or without an external archive for storing non-dominated solutions.
Example usage:
Algorithm<List<DoubleSolution>> algorithm = new ParticleSwarmOptimizationBuilder()
.build(
"MOPSO",
initialSwarmCreation,
evaluation,
termination,
velocityInitialization,
localBestInitialization,
globalBestInitialization,
inertiaWeightStrategy,
velocityUpdate,
positionUpdate,
perturbation,
globalBestUpdate,
localBestUpdate,
globalBestSelection,
globalBestArchive,
externalArchive // can be null if no external archive is needed
);
- Author:
- Antonio J. Nebro (ajnebro@uma.es)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.uma.jmetal.component.algorithm.ParticleSwarmOptimizationAlgorithmbuild(String name, org.uma.jmetal.component.catalogue.common.solutionscreation.SolutionsCreation<org.uma.jmetal.solution.doublesolution.DoubleSolution> solutionsCreation, org.uma.jmetal.component.catalogue.common.evaluation.Evaluation<org.uma.jmetal.solution.doublesolution.DoubleSolution> evaluation, org.uma.jmetal.component.catalogue.common.termination.Termination termination, org.uma.jmetal.component.catalogue.pso.velocityinitialization.VelocityInitialization velocityInitialization, org.uma.jmetal.component.catalogue.pso.localbestinitialization.LocalBestInitialization localBestInitialization, org.uma.jmetal.component.catalogue.pso.globalbestinitialization.GlobalBestInitialization globalBestInitialization, org.uma.jmetal.component.catalogue.pso.inertiaweightcomputingstrategy.InertiaWeightComputingStrategy inertiaWeightStrategy, org.uma.jmetal.component.catalogue.pso.velocityupdate.VelocityUpdate velocityUpdate, org.uma.jmetal.component.catalogue.pso.positionupdate.PositionUpdate positionUpdate, org.uma.jmetal.component.catalogue.pso.perturbation.Perturbation perturbation, org.uma.jmetal.component.catalogue.pso.globalbestupdate.GlobalBestUpdate globalBestUpdate, org.uma.jmetal.component.catalogue.pso.localbestupdate.LocalBestUpdate localBestUpdate, org.uma.jmetal.component.catalogue.pso.globalbestselection.GlobalBestSelection globalBestSelection, org.uma.jmetal.util.archive.BoundedArchive<org.uma.jmetal.solution.doublesolution.DoubleSolution> globalBestArchive, org.uma.jmetal.util.archive.Archive<org.uma.jmetal.solution.doublesolution.DoubleSolution> externalArchive) Builds an instance of ParticleSwarmOptimizationAlgorithm with the specified components.
-
Constructor Details
-
ParticleSwarmOptimizationBuilder
public ParticleSwarmOptimizationBuilder()
-
-
Method Details
-
build
public org.uma.jmetal.component.algorithm.ParticleSwarmOptimizationAlgorithm build(String name, org.uma.jmetal.component.catalogue.common.solutionscreation.SolutionsCreation<org.uma.jmetal.solution.doublesolution.DoubleSolution> solutionsCreation, org.uma.jmetal.component.catalogue.common.evaluation.Evaluation<org.uma.jmetal.solution.doublesolution.DoubleSolution> evaluation, org.uma.jmetal.component.catalogue.common.termination.Termination termination, org.uma.jmetal.component.catalogue.pso.velocityinitialization.VelocityInitialization velocityInitialization, org.uma.jmetal.component.catalogue.pso.localbestinitialization.LocalBestInitialization localBestInitialization, org.uma.jmetal.component.catalogue.pso.globalbestinitialization.GlobalBestInitialization globalBestInitialization, org.uma.jmetal.component.catalogue.pso.inertiaweightcomputingstrategy.InertiaWeightComputingStrategy inertiaWeightStrategy, org.uma.jmetal.component.catalogue.pso.velocityupdate.VelocityUpdate velocityUpdate, org.uma.jmetal.component.catalogue.pso.positionupdate.PositionUpdate positionUpdate, org.uma.jmetal.component.catalogue.pso.perturbation.Perturbation perturbation, org.uma.jmetal.component.catalogue.pso.globalbestupdate.GlobalBestUpdate globalBestUpdate, org.uma.jmetal.component.catalogue.pso.localbestupdate.LocalBestUpdate localBestUpdate, org.uma.jmetal.component.catalogue.pso.globalbestselection.GlobalBestSelection globalBestSelection, org.uma.jmetal.util.archive.BoundedArchive<org.uma.jmetal.solution.doublesolution.DoubleSolution> globalBestArchive, org.uma.jmetal.util.archive.Archive<org.uma.jmetal.solution.doublesolution.DoubleSolution> externalArchive) Builds an instance of ParticleSwarmOptimizationAlgorithm with the specified components.- Parameters:
name- the name of the algorithm (used for identification and logging)solutionsCreation- component responsible for creating the initial swarmevaluation- component that handles solution evaluationtermination- condition that determines when the algorithm should stopvelocityInitialization- strategy for initializing particle velocitieslocalBestInitialization- strategy for initializing local best solutionsglobalBestInitialization- strategy for initializing global best solutionsinertiaWeightStrategy- strategy for computing inertia weight during the searchvelocityUpdate- operator for updating particle velocitiespositionUpdate- operator for updating particle positionsperturbation- operator for applying perturbations to solutionsglobalBestUpdate- strategy for updating the global best solutionlocalBestUpdate- strategy for updating local best solutionsglobalBestSelection- strategy for selecting the global best solutionglobalBestArchive- archive for storing global best solutionsexternalArchive- optional external archive for storing non-dominated solutions (can be null)- Returns:
- a configured instance of ParticleSwarmOptimizationAlgorithm
- Throws:
NullPointerException- if any required parameter is null (except externalArchive)
-