Package org.moeaframework.algorithm
Class ReferencePointNondominatedSortingPopulation
java.lang.Object
org.moeaframework.core.Population
org.moeaframework.core.NondominatedSortingPopulation
org.moeaframework.algorithm.ReferencePointNondominatedSortingPopulation
- All Implemented Interfaces:
Iterable<Solution>
,Stateful
,Displayable
,Formattable<Solution>
Implementation of the reference-point-based nondominated sorting method for NSGA-III. NSGA-III includes an
additional parameter, the number of divisions, that controls the spacing of reference points. For large objective
counts, an alternate two-layered approach was also proposed allowing the user to specify the divisions on the outer
and inner layer. When using the two-layered approach, the number of outer divisions should less than the number of
objectives, otherwise it will generate reference points overlapping with the inner layer. If there are
M
objectives and p
divisions, then binomialCoefficient(M+p-1, p)
reference points are generated.
References:
- Deb, K. and Jain, H. "An Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems With Box Constraints." IEEE Transactions on Evolutionary Computation, 18(4):577-601, 2014.
- Deb, K. and Jain, H. "Handling Many-Objective Problems Using an Improved NSGA-II Procedure. WCCI 2012 IEEE World Contress on Computational Intelligence, Brisbane, Australia, June 10-15, 2012.
- C++ Implementation by Tsung-Che Chiang
-
Constructor Summary
ConstructorDescriptionReferencePointNondominatedSortingPopulation
(int numberOfObjectives, NormalBoundaryDivisions divisions) Constructs an empty population that maintains therank
attribute for its solutions.ReferencePointNondominatedSortingPopulation
(int numberOfObjectives, NormalBoundaryDivisions divisions, Iterable<? extends Solution> iterable) Constructs a new population with the specified solutions that maintains therank
attribute for its solutions.ReferencePointNondominatedSortingPopulation
(int numberOfObjectives, NormalBoundaryDivisions divisions, DominanceComparator comparator) Constructs an empty population that maintains therank
attribute for its solutions.ReferencePointNondominatedSortingPopulation
(int numberOfObjectives, NormalBoundaryDivisions divisions, DominanceComparator comparator, Iterable<? extends Solution> iterable) Constructs a new population with the specified solutions that maintains therank
attribute for its solutions. -
Method Summary
Modifier and TypeMethodDescriptionprotected static double
achievementScalarizingFunction
(Solution solution, double[] weights) The Chebyshev achievement scalarizing function.associateToReferencePoint
(Population population) Associates each solution to the nearest reference point, returning a list-of-lists.protected double[]
Calculates the intercepts between the hyperplane formed by the extreme points and each axis.copy()
Returns a copy of this population.protected Solution
findExtremePoint
(int objective) Returns the extreme point in the given objective.protected Solution
findSolutionWithMinimumDistance
(List<Solution> solutions, double[] weight) Returns the solution with the minimum perpendicular distance to the given reference point.Returns the number of divisions used to create the reference points.void
loadState
(ObjectInputStream stream) Loads the state of this object from the stream.protected void
normalizeByIntercepts
(double[] intercepts) Normalizes the solutions in this population by the given intercepts (or scaling factors).void
saveState
(ObjectOutputStream stream) Writes the state of this object to the stream.protected void
Offsets the solutions in this population by the ideal point.void
truncate
(int size) Truncates the population to the specified size using the reference-point based nondominated sorting method.void
truncate
(int size, Comparator<? super Solution> comparator) Truncates the population to the specified size using the reference-point based nondominated sorting method.protected void
Updates the ideal point given the solutions currently in this population.void
Updates theNiche
andNicheDistance
attributes on all solutions in this population.Methods inherited from class org.moeaframework.core.NondominatedSortingPopulation
add, clear, get, getComparator, iterator, prune, remove, remove, replace, sort, update
Methods inherited from class org.moeaframework.core.Population
addAll, addAll, asList, asTabularData, contains, containsAll, containsAll, filter, getLowerBounds, getUpperBounds, indexOf, isEmpty, loadBinary, loadBinary, loadObjectives, loadObjectives, removeAll, removeAll, removeAll, saveBinary, saveBinary, saveObjectives, saveObjectives, size
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
-
ReferencePointNondominatedSortingPopulation
public ReferencePointNondominatedSortingPopulation(int numberOfObjectives, NormalBoundaryDivisions divisions) Constructs an empty population that maintains therank
attribute for its solutions.- Parameters:
numberOfObjectives
- the number of objectivesdivisions
- the number of divisions
-
ReferencePointNondominatedSortingPopulation
public ReferencePointNondominatedSortingPopulation(int numberOfObjectives, NormalBoundaryDivisions divisions, DominanceComparator comparator, Iterable<? extends Solution> iterable) Constructs a new population with the specified solutions that maintains therank
attribute for its solutions.- Parameters:
numberOfObjectives
- the number of objectivesdivisions
- the number of divisionscomparator
- the dominance comparatoriterable
- the solutions used to initialize this population
-
ReferencePointNondominatedSortingPopulation
public ReferencePointNondominatedSortingPopulation(int numberOfObjectives, NormalBoundaryDivisions divisions, DominanceComparator comparator) Constructs an empty population that maintains therank
attribute for its solutions.- Parameters:
numberOfObjectives
- the number of objectivesdivisions
- the number of divisionscomparator
- the dominance comparator
-
ReferencePointNondominatedSortingPopulation
public ReferencePointNondominatedSortingPopulation(int numberOfObjectives, NormalBoundaryDivisions divisions, Iterable<? extends Solution> iterable) Constructs a new population with the specified solutions that maintains therank
attribute for its solutions.- Parameters:
numberOfObjectives
- the number of objectivesdivisions
- the number of divisionsiterable
- the solutions used to initialize this population
-
-
Method Details
-
getDivisions
Returns the number of divisions used to create the reference points.- Returns:
- the divisions object
-
updateIdealPoint
protected void updateIdealPoint()Updates the ideal point given the solutions currently in this population. -
translateByIdealPoint
protected void translateByIdealPoint()Offsets the solutions in this population by the ideal point. This method does not modify the objective values, instead it sets theNormalizedObjectives
attribute. -
normalizeByIntercepts
protected void normalizeByIntercepts(double[] intercepts) Normalizes the solutions in this population by the given intercepts (or scaling factors). This method does not modify the objective values, instead it sets theNormalizedObjectives
attribute.- Parameters:
intercepts
- the intercepts used for scaling
-
achievementScalarizingFunction
The Chebyshev achievement scalarizing function.- Parameters:
solution
- the normalized solutionweights
- the reference point (weight vector)- Returns:
- the value of the scalarizing function
-
findExtremePoint
Returns the extreme point in the given objective. The extreme point is the point that minimizes the achievement scalarizing function using a reference point near the given objective. The NSGA-III paper (1) does not provide any details on the scalarizing function, but an earlier paper by the authors (2) where some precursor experiments are performed does define a possible function, replicated below.- Parameters:
objective
- the objective index- Returns:
- the extreme point in the given objective
-
calculateIntercepts
protected double[] calculateIntercepts()Calculates the intercepts between the hyperplane formed by the extreme points and each axis. The original paper (1) is unclear how to handle degenerate cases, which occurs more frequently at larger dimensions. In this implementation, we simply use the nadir point for scaling.- Returns:
- an array of the intercept points for each objective
-
associateToReferencePoint
Associates each solution to the nearest reference point, returning a list-of-lists. The outer list maps to each reference point using their index. The inner list is an unordered collection of the solutions associated with the reference point.As a side-effect, this method also sets the
Niche
andNicheDistance
attributes.- Parameters:
population
- the population of solutions- Returns:
- the association of solutions to reference points
-
findSolutionWithMinimumDistance
Returns the solution with the minimum perpendicular distance to the given reference point.- Parameters:
solutions
- the list of solutions being consideredweight
- the reference point- Returns:
- the solution nearest to the reference point
-
truncate
Truncates the population to the specified size using the reference-point based nondominated sorting method.- Overrides:
truncate
in classNondominatedSortingPopulation
- Parameters:
size
- the target population size after truncationcomparator
- the comparator to be used for truncation
-
truncate
public void truncate(int size) Truncates the population to the specified size using the reference-point based nondominated sorting method.- Overrides:
truncate
in classNondominatedSortingPopulation
- Parameters:
size
- the target population size after truncation
-
updateNiches
public void updateNiches()Updates theNiche
andNicheDistance
attributes on all solutions in this population. Normally, this is handled by thetruncate(int, Comparator)
method, but this can be called when the calculation is needed explicitly, such as after initialization. -
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 classNondominatedSortingPopulation
- 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 classNondominatedSortingPopulation
- 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 classNondominatedSortingPopulation
- Parameters:
stream
- the stream- Throws:
IOException
- if an I/O error occurredClassNotFoundException
- if the stream referenced a class that is not defined
-