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:
Extensible
,Algorithm
,Configurable
,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.double
Returns the mutation probability used by the uniform and non-uniform mutation operators.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.protected void
setArchive
(EpsilonBoxDominanceArchive archive) Sets the archive of non-dominated solutions; ornull
of no external archive is used.protected 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.core.Algorithm
evaluateAll, evaluateAll, run, 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 problemmaxIterations
- the maximum number of iterations for scaling non-uniform mutation; typically this should bemaxEvaluations / swarmSize
-
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
-
-
Method Details
-
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
.
-
setMaxIterations
protected void setMaxIterations(int maxIterations) Sets the maximum number of iterations for scaling the non-uniform mutation. Typically this should be set tomaxEvaluations / swarmSize
.- Parameters:
maxIterations
- the maximum number of iterations
-
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 callTypedProperties.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 anyConfigurable
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
-