Package org.moeaframework.algorithm
Class RVEA
java.lang.Object
org.moeaframework.algorithm.AbstractAlgorithm
org.moeaframework.algorithm.AbstractEvolutionaryAlgorithm
org.moeaframework.algorithm.RVEA
- All Implemented Interfaces:
Extensible
,Algorithm
,Configurable
,EvolutionaryAlgorithm
,Stateful
Implementation of the Reference Vector Guided Evolutionary Algorithm (RVEA). This version does not include the
reference vector regeneration method proposed by the authors.
RVEA is similar in concept to NSGA-III, but replaces NSGA-III's dominance-based selection with an angle-penalized distance function. Additionally, whereas NSGA-III renormalizes the objectives every iteration, RVEA periodically scales the reference vectors, potentially reducing algorithm overhead.
References:
- R. Cheng, Y. Jin, M. Olhofer, and B. Sendhoff. "A Reference Vector Guided Evolutionary Algorithm for Many-objective Optimization." IEEE Transactions on Evolutionary Computation, Issue 99, 2016.
-
Field Summary
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
-
Constructor Summary
ConstructorDescriptionConstructs a new instance of RVEA with default settings.RVEA
(Problem problem, int initialPopulationSize, ReferenceVectorGuidedPopulation population, Variation variation, Initialization initialization, int maxGeneration, int adaptFrequency) Constructs a new instance of the RVEA algorithm.RVEA
(Problem problem, NormalBoundaryDivisions divisions, int maxGeneration) Constructs a new instance of RVEA with default settings. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyConfiguration
(TypedProperties properties) Applies the properties to this instance.int
Returns the frequency, in generations, that the reference vectors are normalized.Gets the current configuration of this instance.Returns the current population of this evolutionary algorithm.protected void
iterate()
Performs one iteration of the algorithm.void
loadState
(ObjectInputStream stream) Loads the state of this object from the stream.void
saveState
(ObjectOutputStream stream) Writes the state of this object to the stream.void
setAdaptFrequency
(int adaptFrequency) Sets the frequency, in generations, that the reference vectors are normalized.void
setInitialPopulationSize
(int initialPopulationSize) Sets the initial population size.void
setVariation
(Variation variation) Replaces the variation operator to be used by this algorithm.Methods inherited from class org.moeaframework.algorithm.AbstractEvolutionaryAlgorithm
getArchive, getInitialization, getInitialPopulationSize, getResult, getVariation, initialize, setArchive, setInitialization, setPopulation
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
evaluate, evaluateAll, evaluateAll, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, run, run, step, terminate
Methods inherited from interface org.moeaframework.algorithm.extension.Extensible
addExtension, getExtensions, removeExtension
-
Constructor Details
-
RVEA
Constructs a new instance of RVEA with default settings.- Parameters:
problem
- the problem being solvedmaxGeneration
- the maximum number of generations for the angle-penalized distance to transition between convergence and diversity
-
RVEA
Constructs a new instance of RVEA with default settings.- Parameters:
problem
- the problem being solveddivisions
- the number of divisions used by the reference vector guided populationmaxGeneration
- the maximum number of generations for the angle-penalized distance to transition between convergence and diversity
-
RVEA
public RVEA(Problem problem, int initialPopulationSize, ReferenceVectorGuidedPopulation population, Variation variation, Initialization initialization, int maxGeneration, int adaptFrequency) Constructs a new instance of the RVEA algorithm.- Parameters:
problem
- the problem being solvedinitialPopulationSize
- the initial population sizepopulation
- the population used to store solutionsvariation
- the variation operatorinitialization
- the initialization methodmaxGeneration
- the maximum number of generations for the angle-penalized distance to transition between convergence and diversityadaptFrequency
- the frequency, in generations, that the reference vectors are normalized
-
-
Method Details
-
iterate
protected void iterate()Description copied from class:AbstractAlgorithm
Performs one iteration of the algorithm. This method should be overridden by implementations to perform each logical iteration of the algorithm.- Specified by:
iterate
in classAbstractAlgorithm
-
getAdaptFrequency
public int getAdaptFrequency()Returns the frequency, in generations, that the reference vectors are normalized.- Returns:
- the frequency, in generations
-
setAdaptFrequency
public void setAdaptFrequency(int adaptFrequency) Sets the frequency, in generations, that the reference vectors are normalized.- Parameters:
adaptFrequency
- the frequency, in generations
-
getPopulation
Description copied from interface:EvolutionaryAlgorithm
Returns the current population of this evolutionary algorithm.- Specified by:
getPopulation
in interfaceEvolutionaryAlgorithm
- Overrides:
getPopulation
in classAbstractEvolutionaryAlgorithm
- Returns:
- the current population of this evolutionary algorithm
-
setVariation
Description copied from class:AbstractEvolutionaryAlgorithm
Replaces the variation operator to be used by this algorithm.- Overrides:
setVariation
in classAbstractEvolutionaryAlgorithm
- Parameters:
variation
- the variation operator
-
setInitialPopulationSize
public void setInitialPopulationSize(int initialPopulationSize) Description copied from class:AbstractEvolutionaryAlgorithm
Sets the initial population size. This value can not be set after initialization.- Overrides:
setInitialPopulationSize
in classAbstractEvolutionaryAlgorithm
- Parameters:
initialPopulationSize
- the initial population size
-
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
-
saveState
Description copied from interface:Stateful
Writes the state of this object to the stream. The order that objects are written to the stream is important. We recommend first callingsuper.saveState(stream)
followed by writing each field.- Specified by:
saveState
in interfaceStateful
- Overrides:
saveState
in classAbstractEvolutionaryAlgorithm
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurred
-
loadState
Description copied from interface:Stateful
Loads the state of this object from the stream. The order for reading objects from the stream must match the order they are written to the stream inStateful.saveState(ObjectOutputStream)
.- Specified by:
loadState
in interfaceStateful
- Overrides:
loadState
in classAbstractEvolutionaryAlgorithm
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurredClassNotFoundException
- if the stream referenced a class that is not defined
-