Class EpsilonBoxDominanceArchive
java.lang.Object
org.moeaframework.core.population.Population
org.moeaframework.core.population.NondominatedPopulation
org.moeaframework.core.population.EpsilonBoxDominanceArchive
- All Implemented Interfaces:
Iterable<Solution>,Copyable<Population>,Stateful,Displayable,Formattable<Solution>
A non-dominated population using an ε-box dominance comparator. ε-Dominance archives provide
several important theoretical properties, such as guaranteed convergence and diversity if certain other
conditions hold [1]. In addition, this archive also tracks ε-progress [2] by counting the number of
ε-box improvements.
References:
- Laumanns, M. et al. "Combining Convergence and Diversity in Evolutionary Multi-Objective Optimization." Evolutionary Computation, 10(3):263-282, 2002.
- Hadka, D. and Reed, P. "Borg: An Auto-Adaptive Many-Objective Evolutionary Computing Framework." Evolutionary Computation, 21(2):231-259, 2013.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.moeaframework.core.population.NondominatedPopulation
NondominatedPopulation.DuplicateMode -
Field Summary
Fields inherited from class org.moeaframework.core.population.NondominatedPopulation
comparator, duplicateMode -
Constructor Summary
ConstructorsConstructorDescriptionEpsilonBoxDominanceArchive(double epsilon) Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε.EpsilonBoxDominanceArchive(double[] epsilons) Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values.EpsilonBoxDominanceArchive(double[] epsilons, Iterable<? extends Solution> iterable) Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values and initialized with the specified solutions.EpsilonBoxDominanceArchive(double epsilon, Iterable<? extends Solution> iterable) Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε and initialized with the specified solutions.Constructs an empty ε-box dominance archive using the specified ε-box dominance comparator.EpsilonBoxDominanceArchive(EpsilonBoxDominanceComparator comparator, Iterable<? extends Solution> iterable) Constructs an ε-box dominance archive using the specified ε-box dominance comparator and initialized with the specified solutions.EpsilonBoxDominanceArchive(Epsilons epsilons) Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values.EpsilonBoxDominanceArchive(Epsilons epsilons, Iterable<? extends Solution> iterable) Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values and initialized with the specified solutions. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIfnewSolutionis dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed andnewSolutionis added to this population.copy()Returns a copy of this population.Returns the ε-box dominance comparator used by this archive.intReturns the number of ε-box improvements dominating existing solutions that have occurred.intReturns the number of ε-box improvements that have occurred.voidloadState(ObjectInputStream stream) Loads the state of this object from the stream.static EpsilonBoxDominanceArchiveof(Population population, Epsilons epsilons) Converts the population to an ε-box dominance archive with the given ε values.voidsaveState(ObjectOutputStream stream) Writes the state of this object to the stream.Methods inherited from class org.moeaframework.core.population.NondominatedPopulation
forceAddWithoutCheck, getDuplicateMode, isDuplicate, load, load, load, replaceMethods inherited from class org.moeaframework.core.population.Population
addAll, addAll, asList, asTabularData, clear, contains, containsAll, containsAll, filter, get, getLowerBounds, getUpperBounds, indexOf, isEmpty, iterator, remove, remove, removeAll, removeAll, removeAll, save, save, size, sort, truncateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.moeaframework.util.format.Displayable
displayMethods inherited from interface org.moeaframework.util.format.Formattable
display, display, display, save, save, saveMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
EpsilonBoxDominanceArchive
public EpsilonBoxDominanceArchive(double epsilon) Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε.- Parameters:
epsilon- the ε value used by the additive ε-box dominance comparator
-
EpsilonBoxDominanceArchive
Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε and initialized with the specified solutions.- Parameters:
epsilon- the ε value used by the additive ε-box dominance comparatoriterable- the solutions used to initialize this archive
-
EpsilonBoxDominanceArchive
public EpsilonBoxDominanceArchive(double[] epsilons) Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values.- Parameters:
epsilons- the ε values used by the additive ε-box dominance comparator
-
EpsilonBoxDominanceArchive
Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values and initialized with the specified solutions.- Parameters:
epsilons- the ε values used by the additive ε-box dominance comparatoriterable- the solutions used to initialize this archive
-
EpsilonBoxDominanceArchive
Constructs an empty ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values.- Parameters:
epsilons- the ε values used by the additive ε-box dominance comparator
-
EpsilonBoxDominanceArchive
Constructs an ε-box dominance archive using an additive ε-box dominance comparator with the specified ε values and initialized with the specified solutions.- Parameters:
epsilons- the ε values used by the additive ε-box dominance comparatoriterable- the solutions used to initialize this archive
-
EpsilonBoxDominanceArchive
Constructs an empty ε-box dominance archive using the specified ε-box dominance comparator.- Parameters:
comparator- the ε-box dominance comparator used by this archive
-
EpsilonBoxDominanceArchive
public EpsilonBoxDominanceArchive(EpsilonBoxDominanceComparator comparator, Iterable<? extends Solution> iterable) Constructs an ε-box dominance archive using the specified ε-box dominance comparator and initialized with the specified solutions.- Parameters:
comparator- the ε-box dominance comparator used by this archiveiterable- the solutions used to initialize this archive
-
-
Method Details
-
of
Converts the population to an ε-box dominance archive with the given ε values. To prevent unnecessary conversion, this checks if the original population is already anEpsilonBoxDominanceArchivewith identical ε values.- Parameters:
population- the population to convertepsilons- the ε values- Returns:
- the population converted to an ε-box dominance archive with the given ε values
-
add
Description copied from class:NondominatedPopulationIfnewSolutionis dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed andnewSolutionis added to this population. Otherwise,newSolutionis dominated and is not added to this population.- Overrides:
addin classNondominatedPopulation- Parameters:
newSolution- the solution to be added- Returns:
trueif the population was modified as a result of this method;falseotherwise.
-
getComparator
Returns the ε-box dominance comparator used by this archive.- Overrides:
getComparatorin classNondominatedPopulation- Returns:
- the ε-box dominance comparator used by this archive
-
getNumberOfImprovements
public int getNumberOfImprovements()Returns the number of ε-box improvements that have occurred.- Returns:
- the number of ε-box improvements that have occurred
-
getNumberOfDominatingImprovements
public int getNumberOfDominatingImprovements()Returns the number of ε-box improvements dominating existing solutions that have occurred.- Returns:
- the number of ε-box improvements dominating existing solutions that have occurred
-
copy
Description copied from class:PopulationReturns a copy of this population. This can be thought of as a "deep copy", which creates a copy of both the population itself and copies of the individual solutions in the population. Consequently, the returned copy is completely independent, such that any modifications to the contents or order will not impact the original.Since creating such a "deep copy" can be expensive, prefer using the constructor
Population(Iterable)orPopulation.addAll(Iterable)whenever possible. These alternatives are useful when filtering or reordering the solutions, but the solutions themselves are left unchanged.- Specified by:
copyin interfaceCopyable<Population>- Overrides:
copyin classNondominatedPopulation- Returns:
- the copy of this population
-
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 classPopulation- 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 classPopulation- Parameters:
stream- the stream- Throws:
IOException- if an I/O error occurredClassNotFoundException- if the stream referenced a class that is not defined
-