|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.core.Population
org.moeaframework.core.NondominatedPopulation
org.moeaframework.core.AdaptiveGridArchive
public class AdaptiveGridArchive
Adaptive grid archive. Divides objective space into a number of grid cells, maintaining a count of the number of solutions within each grid cell. When the size of the archive exceeds a specified capacity, a solution from the most crowded grid cell is selected and removed from the archive.
References:
| Field Summary | |
|---|---|
protected int |
capacity
The maximum capacity of this archive. |
protected int[] |
density
The number of solutions in each grid cell. |
protected double[] |
maximum
The maximum objective value for each dimension. |
protected double[] |
minimum
The minimum objective value for each dimension. |
protected int |
numberOfDivisions
The number of divisions this archive uses to split each objective. |
protected Problem |
problem
The problem for which this archive is used. |
| Constructor Summary | |
|---|---|
AdaptiveGridArchive(int capacity,
Problem problem,
int numberOfDivisions)
Constructs an adaptive grid archive with the specified capacity with the specified number of divisions along each objective. |
|
| Method Summary | |
|---|---|
protected void |
adaptGrid()
Computes new lower and upper bounds and recalculates the densities of each grid cell. |
boolean |
add(Solution solution)
If newSolution is dominates any solution or is non-dominated with
all solutions in this population, the dominated solutions are removed and
newSolution is added to this population. |
void |
clear()
Removes all solutions from this population. |
protected int |
findDensestIndex()
Returns the index of the solution residing in the densest grid cell. |
int |
findIndex(Solution solution)
Returns the index of the specified solution in this adaptive grid archive, or -1 if the solution is not within the current lower
and upper bounds. |
int |
getCapacity()
Returns the maximum number of solutions stored in this archive. |
int |
getDensity(int index)
Returns the density of the solution at the given index. |
int |
getNumberOfDivisions()
Returns the number of divisions this archive uses to split each objective. |
Problem |
getProblem()
Returns the problem for which this archive is used. |
void |
remove(int index)
Removes the solution at the specified index from this population. |
boolean |
remove(Solution solution)
Removes the specified solution from this population, if present. |
| Methods inherited from class org.moeaframework.core.NondominatedPopulation |
|---|
distance, forceAddWithoutCheck, getComparator |
| Methods inherited from class org.moeaframework.core.Population |
|---|
addAll, addAll, contains, containsAll, containsAll, get, indexOf, isEmpty, iterator, removeAll, removeAll, size, sort, truncate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int capacity
protected final Problem problem
protected final int numberOfDivisions
protected double[] minimum
protected double[] maximum
protected int[] density
| Constructor Detail |
|---|
public AdaptiveGridArchive(int capacity,
Problem problem,
int numberOfDivisions)
capacity - the capacity of this archiveproblem - the problem for which this archive is usednumberOfDivisions - the number of divisions this archive uses to
split each objective| Method Detail |
|---|
public int getCapacity()
public int getNumberOfDivisions()
public Problem getProblem()
public boolean add(Solution solution)
NondominatedPopulationnewSolution is dominates any solution or is non-dominated with
all solutions in this population, the dominated solutions are removed and
newSolution is added to this population. Otherwise,
newSolution is dominated and is not added to this population.
add in class NondominatedPopulationsolution - the solution to be added
true if the population was modified as a result of this
method; false otherwise.public void remove(int index)
Population
remove in class Populationindex - the index of the solution to be removedpublic boolean remove(Solution solution)
Population
remove in class Populationsolution - the solution to be removed
true if this population was modified as a result of this
method; false otherwisepublic void clear()
Population
clear in class Populationprotected int findDensestIndex()
protected void adaptGrid()
public int findIndex(Solution solution)
-1 if the solution is not within the current lower
and upper bounds.
solution - the specified solution
-1 if the solution is not within the current
lower and upper boundspublic int getDensity(int index)
index - the solution index
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||