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, velocities
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyConfiguration
(TypedProperties properties) Applies the properties to this instance.protected EpsilonBoxDominanceArchive
Returns the archive of non-dominated solutions; ornull
of no external archive is used.Gets the current configuration of this instance.int
Returns the maximum number of iterations for scaling the non-uniform mutation.double
Returns the mutation probability used by the uniform and non-uniform mutation operators.getName()
Returns the name of this algorithm.double
Returns the perturbation index used by uniform and non-uniform mutation.protected void
mutate
(int i) Applies the mutation operator to an individual particle.void
run
(TerminationCondition terminationCondition) Executes this algorithm until the terminal condition signals it to stop.protected void
setArchive
(EpsilonBoxDominanceArchive archive) Sets the archive of non-dominated solutions; ornull
of no external archive is used.void
setMaxIterations
(int maxIterations) Sets the maximum number of iterations for scaling the non-uniform mutation.void
setMutationProbability
(double mutationProbability) Sets the mutation probability used by the uniform and non-uniform mutation operators.void
setPerturbationIndex
(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, updateVelocity
Methods inherited from class org.moeaframework.algorithm.AbstractAlgorithm
assertNotInitialized, evaluate, getExtensions, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, step, terminate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.algorithm.Algorithm
evaluateAll, evaluateAll, run
Methods 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-1
to derive the value frommaxEvaluations
-
-
Method Details
-
getName
Description copied from interface:Algorithm
Returns 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
, whereN
is 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:AbstractPSOAlgorithm
Returns the archive of non-dominated solutions; ornull
of no external archive is used.- Overrides:
getArchive
in classAbstractPSOAlgorithm
- Returns:
- the archive or
null
-
setArchive
Sets the archive of non-dominated solutions; ornull
of 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-1
will derive the value from the termination conditions.- Parameters:
maxIterations
- the maximum number of iterations
-
run
Description copied from interface:Algorithm
Executes 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:AbstractPSOAlgorithm
Applies the mutation operator to an individual particle.- Overrides:
mutate
in classAbstractPSOAlgorithm
- Parameters:
i
- the index of the particle
-
applyConfiguration
Description copied from interface:Configurable
Applies 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
Configurable
objects inside this object, they should be updated before callingsuper.applyConfiguration(properties)
.- Parameters:
properties
- the user-defined properties
-
getConfiguration
Description copied from interface:Configurable
Gets 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
-