Class RVEA
- All Implemented Interfaces:
Algorithm,EvolutionaryAlgorithm,Extensible,Configurable,Named,Stateful
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
ConstructorsConstructorDescriptionConstructs a new instance of RVEA with default settings.RVEA(Problem problem, int initialPopulationSize, ReferenceVectorGuidedPopulation population, Variation variation, Initialization initialization, int maxIterations, int adaptFrequency) Constructs a new instance of the RVEA algorithm. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyConfiguration(TypedProperties properties) Applies the properties to this instance.intReturns the frequency, in iterations, that the reference vectors are normalized.Gets the current configuration of this instance.intReturns the maximum number of iterations for the angle-penalized distance to transition between convergence and diversity.getName()Returns the name of this algorithm.Returns the current population of this evolutionary algorithm.protected voiditerate()Performs one iteration of the algorithm.voidloadState(ObjectInputStream stream) Loads the state of this object from the stream.voidrun(TerminationCondition terminationCondition) Executes this algorithm until the terminal condition signals it to stop.voidsaveState(ObjectOutputStream stream) Writes the state of this object to the stream.voidsetAdaptFrequency(int adaptFrequency) Sets the frequency, in iterations, that the reference vectors are normalized.voidsetInitialPopulationSize(int initialPopulationSize) Sets the initial population size.voidsetMaxIterations(int maxIterations) Sets the maximum number of iterations for the angle-penalized distance to transition between convergence and diversity.voidsetVariation(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, setPopulationMethods 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
evaluate, evaluateAll, evaluateAll, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, run, step, terminateMethods 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 solved
-
RVEA
public RVEA(Problem problem, int initialPopulationSize, ReferenceVectorGuidedPopulation population, Variation variation, Initialization initialization, int maxIterations, 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 methodmaxIterations- the maximum number of iterations for the angle-penalized distance to transition between convergence and diversity, set to-1to derive the value frommaxEvaluationsadaptFrequency- the frequency, in iterations, that the reference vectors are normalized
-
-
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
-
iterate
protected void iterate()Description copied from class:AbstractAlgorithmPerforms one iteration of the algorithm. This method should be overridden by implementations to perform each logical iteration of the algorithm.- Specified by:
iteratein classAbstractAlgorithm
-
getAdaptFrequency
public int getAdaptFrequency()Returns the frequency, in iterations, that the reference vectors are normalized.- Returns:
- the frequency, in iterations
-
setAdaptFrequency
public void setAdaptFrequency(int adaptFrequency) Sets the frequency, in iterations, that the reference vectors are normalized.- Parameters:
adaptFrequency- the frequency, in iterations
-
getMaxIterations
public int getMaxIterations()Returns the maximum number of iterations for the angle-penalized distance to transition between convergence and diversity.- Returns:
- the maximum number of iterations
-
setMaxIterations
public void setMaxIterations(int maxIterations) Sets the maximum number of iterations for the angle-penalized distance to transition between convergence and diversity. If set to-1, the max iterations will be derived fromAlgorithm.run(int).- Parameters:
maxIterations- the maximum number of iterations
-
getPopulation
Description copied from interface:EvolutionaryAlgorithmReturns the current population of this evolutionary algorithm.- Specified by:
getPopulationin interfaceEvolutionaryAlgorithm- Overrides:
getPopulationin classAbstractEvolutionaryAlgorithm- Returns:
- the current population of this evolutionary algorithm
-
setVariation
Description copied from class:AbstractEvolutionaryAlgorithmReplaces the variation operator to be used by this algorithm.- Overrides:
setVariationin classAbstractEvolutionaryAlgorithm- Parameters:
variation- the variation operator
-
setInitialPopulationSize
public void setInitialPopulationSize(int initialPopulationSize) Description copied from class:AbstractEvolutionaryAlgorithmSets the initial population size. This value can not be set after initialization.- Overrides:
setInitialPopulationSizein classAbstractEvolutionaryAlgorithm- Parameters:
initialPopulationSize- the initial population size
-
run
Description copied from interface:AlgorithmExecutes this algorithm until the terminal condition signals it to stop.- Parameters:
terminationCondition- the termination condition
-
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
-
saveState
Description copied from interface:StatefulWrites 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:
saveStatein interfaceStateful- Overrides:
saveStatein classAbstractEvolutionaryAlgorithm- Parameters:
stream- the stream- Throws:
IOException- if an I/O error occurred
-
loadState
Description copied from interface:StatefulLoads 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:
loadStatein interfaceStateful- Overrides:
loadStatein classAbstractEvolutionaryAlgorithm- Parameters:
stream- the stream- Throws:
IOException- if an I/O error occurredClassNotFoundException- if the stream referenced a class that is not defined
-