Package org.moeaframework.algorithm.pso
Class OMOPSO
java.lang.Object
org.moeaframework.algorithm.AbstractAlgorithm
org.moeaframework.algorithm.pso.AbstractPSOAlgorithm
org.moeaframework.algorithm.pso.OMOPSO
- All Implemented Interfaces:
Algorithm,Extensible,Configurable,Named,Stateful
Implementation of OMOPSO, a multi-objective particle swarm optimizer (MOPSO). According to [2], OMOPSO is one of
the top-performing PSO algorithms.
References:
- Sierra, M. R. and C. A. Coello Coello (2005). Improving PSO-based Multi-Objective Optimization using Crowding, Mutation and ε-Dominance. Evolutionary Multi-Criterion Optimization, pp. 505-519.
- Durillo, J. J., J. Garc�a-Nieto, A. J. Nebro, C. A. Coello Coello, F. Luna, and E. Alba (2009). Multi-Objective Particle Swarm Optimizers: An Experimental Comparison. Evolutionary Multi-Criterion Optimization, pp. 495-509.
-
Field Summary
Fields inherited from class org.moeaframework.algorithm.pso.AbstractPSOAlgorithm
archive, dominanceComparator, leaderComparator, leaders, localBestParticles, mutation, particles, velocitiesFields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyConfiguration(TypedProperties properties) Applies the properties to this instance.protected EpsilonBoxDominanceArchiveReturns the archive of non-dominated solutions; ornullof no external archive is used.Gets the current configuration of this instance.intReturns the maximum number of iterations for scaling the non-uniform mutation.doubleReturns the mutation probability used by the uniform and non-uniform mutation operators.getName()Returns the name of this algorithm.doubleReturns the perturbation index used by uniform and non-uniform mutation.protected voidmutate(int i) Applies the mutation operator to an individual particle.voidrun(TerminationCondition terminationCondition) Executes this algorithm until the terminal condition signals it to stop.protected voidsetArchive(EpsilonBoxDominanceArchive archive) Sets the archive of non-dominated solutions; ornullof no external archive is used.voidsetMaxIterations(int maxIterations) Sets the maximum number of iterations for scaling the non-uniform mutation.voidsetMutationProbability(double mutationProbability) Sets the mutation probability used by the uniform and non-uniform mutation operators.voidsetPerturbationIndex(double perturbationIndex) Sets the perturbation index used by uniform and non-uniform mutation.Methods inherited from class org.moeaframework.algorithm.pso.AbstractPSOAlgorithm
copyToList, getLeaders, getLeaderSize, getLocalBestParticles, getMutation, getParticles, getResult, getSwarmSize, initialize, iterate, loadState, mutate, saveState, selectLeader, setArchive, setLeaderSize, setSwarmSize, updateLocalBest, updatePosition, updatePositions, updateVelocities, updateVelocityMethods inherited from class org.moeaframework.algorithm.AbstractAlgorithm
assertNotInitialized, evaluate, getExtensions, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, step, terminateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.moeaframework.algorithm.Algorithm
evaluateAll, evaluateAll, runMethods inherited from interface org.moeaframework.algorithm.extension.Extensible
addExtension, removeExtension
-
Constructor Details
-
OMOPSO
Constructs a new OMOPSO instance with default settings.- Parameters:
problem- the problem
-
OMOPSO
public OMOPSO(Problem problem, int swarmSize, int leaderSize, Epsilons epsilons, double mutationProbability, double mutationPerturbation, int maxIterations) Constructs a new OMOPSO instance.- Parameters:
problem- the problemswarmSize- the number of particlesleaderSize- the number of leadersepsilons- the ε-values used in the external archivemutationProbability- the mutation probability for uniform and non-uniform mutationmutationPerturbation- the perturbation index for uniform and non-uniform mutationmaxIterations- the maximum iterations for scaling the non-uniform mutation, set to-1to derive the value frommaxEvaluations
-
-
Method Details
-
getName
Description copied from interface:AlgorithmReturns the name of this algorithm. Whenever possible, this name should match the name recognized byAlgorithmFactory.- Returns:
- the name of this algorithm
-
getMutationProbability
public double getMutationProbability()Returns the mutation probability used by the uniform and non-uniform mutation operators.- Returns:
- the mutation probability
-
setMutationProbability
public void setMutationProbability(double mutationProbability) Sets the mutation probability used by the uniform and non-uniform mutation operators. The default value is1 / N, whereNis the number of decision variables.- Parameters:
mutationProbability- the mutation probability
-
getPerturbationIndex
public double getPerturbationIndex()Returns the perturbation index used by uniform and non-uniform mutation.- Returns:
- the perturbation index
-
setPerturbationIndex
public void setPerturbationIndex(double perturbationIndex) Sets the perturbation index used by uniform and non-uniform mutation. The default value is0.5.- Parameters:
perturbationIndex- the perturbation index
-
getArchive
Description copied from class:AbstractPSOAlgorithmReturns the archive of non-dominated solutions; ornullof no external archive is used.- Overrides:
getArchivein classAbstractPSOAlgorithm- Returns:
- the archive or
null
-
setArchive
Sets the archive of non-dominated solutions; ornullof no external archive is used. This value can only be set before initialization.- Parameters:
archive- the archive ornull.
-
getMaxIterations
public int getMaxIterations()Returns the maximum number of iterations for scaling the non-uniform mutation.- Returns:
- the maximum number of iterations for scaling the non-uniform mutation
-
setMaxIterations
public void setMaxIterations(int maxIterations) Sets the maximum number of iterations for scaling the non-uniform mutation. Typically this should be set tomaxEvaluations / swarmSize. However, setting to-1will derive the value from the termination conditions.- Parameters:
maxIterations- the maximum number of iterations
-
run
Description copied from interface:AlgorithmExecutes this algorithm until the terminal condition signals it to stop.- Parameters:
terminationCondition- the termination condition
-
mutate
protected void mutate(int i) Description copied from class:AbstractPSOAlgorithmApplies the mutation operator to an individual particle.- Overrides:
mutatein classAbstractPSOAlgorithm- Parameters:
i- the index of the particle
-
applyConfiguration
Description copied from interface:ConfigurableApplies the properties to this instance. It is strongly recommended to apply a configuration immediately after creating the instance, as some properties can not be changed after the class is used. Exceptions may be thrown if attempting to set such properties.After calling this method, we encourage users to call
TypedProperties.warnIfUnaccessedProperties()to verify all properties were processed. This can identify simple mistakes like typos.If overriding this method, properties should only be updated if a new value is provided. Additionally, if updating any
Configurableobjects inside this object, they should be updated before callingsuper.applyConfiguration(properties).- Parameters:
properties- the user-defined properties
-
getConfiguration
Description copied from interface:ConfigurableGets the current configuration of this instance. In theory, these properties should be able to create a duplicate instance. Note however, they are unlikely to behave identically due to random numbers and other transient fields.- Returns:
- the properties defining this instance
-