Package org.moeaframework.core
Class EpsilonBoxDominanceArchive
java.lang.Object
org.moeaframework.core.Population
org.moeaframework.core.NondominatedPopulation
org.moeaframework.core.EpsilonBoxDominanceArchive
- All Implemented Interfaces:
Iterable<Solution>
,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.NondominatedPopulation
NondominatedPopulation.DuplicateMode
-
Field Summary
Fields inherited from class org.moeaframework.core.NondominatedPopulation
comparator, duplicateMode
-
Constructor Summary
ConstructorDescriptionEpsilonBoxDominanceArchive
(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 TypeMethodDescriptionboolean
IfnewSolution
is dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed andnewSolution
is added to this population.copy()
Returns a copy of this population.Returns the ε-box dominance comparator used by this archive.int
Returns the number of ε-box improvements dominating existing solutions that have occurred.int
Returns the number of ε-box improvements that have occurred.void
loadState
(ObjectInputStream stream) Loads the state of this object from the stream.static EpsilonBoxDominanceArchive
of
(Population population, Epsilons epsilons) Converts the population to an ε-box dominance archive with the given ε values.void
saveState
(ObjectOutputStream stream) Writes the state of this object to the stream.Methods inherited from class org.moeaframework.core.NondominatedPopulation
forceAddWithoutCheck, isDuplicate, loadReferenceSet, loadReferenceSet, replace
Methods inherited from class org.moeaframework.core.Population
addAll, addAll, asList, asTabularData, clear, contains, containsAll, containsAll, filter, get, getLowerBounds, getUpperBounds, indexOf, isEmpty, iterator, loadBinary, loadBinary, loadObjectives, loadObjectives, remove, remove, removeAll, removeAll, removeAll, saveBinary, saveBinary, saveObjectives, saveObjectives, size, sort, truncate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.util.format.Displayable
display
Methods inherited from interface org.moeaframework.util.format.Formattable
display, display, display, save, saveCSV
Methods 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 anEpsilonBoxDominanceArchive
with 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:NondominatedPopulation
IfnewSolution
is dominates any solution or is non-dominated with all solutions in this population, the dominated solutions are removed andnewSolution
is added to this population. Otherwise,newSolution
is dominated and is not added to this population.- Overrides:
add
in classNondominatedPopulation
- Parameters:
newSolution
- the solution to be added- Returns:
true
if the population was modified as a result of this method;false
otherwise.
-
getComparator
Returns the ε-box dominance comparator used by this archive.- Overrides:
getComparator
in 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:Population
Returns 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.- Overrides:
copy
in classNondominatedPopulation
- Returns:
- the copy of this population
-
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 classPopulation
- 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 classPopulation
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurredClassNotFoundException
- if the stream referenced a class that is not defined
-