|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.AbstractIterator
iterator.AbstractOptimizer<T>
iterator.AbstractInitialSampleBasedOptimizer<T>
iterator.AbstractPopulationOptimizer<T>
iterator.BasicRealEncodedGA<MultiObjectiveProblem>
iterator.NSGA2
public class NSGA2
NSGA-II algorithm. Implemented in a multithreaded fashion.
| Field Summary |
|---|
| Fields inherited from class iterator.BasicRealEncodedGA |
|---|
comparator, extrapolationFactor, interpolationFactor, xMutation |
| Fields inherited from class iterator.AbstractPopulationOptimizer |
|---|
currentBestG, lastBestG, nextBlock |
| Fields inherited from class iterator.AbstractInitialSampleBasedOptimizer |
|---|
uniform |
| Fields inherited from class iterator.AbstractOptimizer |
|---|
doubleFormat, funEvalCount, logWriter |
| Fields inherited from class iterator.AbstractIterator |
|---|
diagnosticString, iter |
| Constructor Summary | |
|---|---|
NSGA2()
|
|
| Method Summary | |
|---|---|
protected cern.colt.matrix.DoubleMatrix2D |
computeNextPoints()
Computes the next set of candidate solutions. |
protected void |
evaluatePoints(cern.colt.matrix.DoubleMatrix2D nextPoints)
Evaluates the objective (and constraints) given set of points. |
iterator.NSGA2.PopulationMember[] |
getPopulation()
|
int |
getThreadCount()
Returns the number of threads this iterator can launch simultaneously. |
void |
init()
Initialization routine |
protected void |
initializePopulation()
Creates an initial population. |
boolean |
isWriteFrontsToFile()
Returns true if the pareto fronts at each iteration are to be
written to a file. |
void |
iterate()
Iterates until termination. |
static void |
main(java.lang.String[] args)
|
void |
setInitialSamples(cern.colt.matrix.DoubleMatrix2D initialSamples)
|
void |
setThreadCount(int threadCount)
Sets the number of threads this iterator can launch simultaneously. |
void |
setWriteFrontsToFile(boolean writeFrontsToFile)
Sets whether the pareto fronts at each iteration will be written to file. |
void |
singleIteration()
Performs a single iteration. |
double[] |
singleObjectiveSearch(int objectiveIndex,
double fraction)
Sorts the pareto front according to the specified objective, then returns the population member at the specified fraction of this sorted list. |
iterator.NSGA2.PopulationMember[] |
sortFrontOn(int objectiveIndex)
Sorts the pareto front on the specified objective. |
protected void |
updateDiagnostics()
Provides access to the diagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times. |
| Methods inherited from class iterator.BasicRealEncodedGA |
|---|
getExtrapolationFactor, getInterpolationFactor, getMutationBox, getMutationFraction, getMutationProbability, makeChildren, setExtrapolationFactor, setInterpolationFactor, setMutationBox, setMutationFraction, setMutationProbability |
| Methods inherited from class iterator.AbstractPopulationOptimizer |
|---|
getPopulationSize, setInitialSamples, setInitialSamples, setPopulationSize |
| Methods inherited from class iterator.AbstractInitialSampleBasedOptimizer |
|---|
getRandomSeed, makeInitialSamples, setRandomSeed |
| Methods inherited from class iterator.AbstractOptimizer |
|---|
clear, dataAdded, dataAdded, dataRemoved, dataRemoved, getDataHandler, getFunEvalCount, getLogFileName, getMaxFunEval, getProblem, isTerminated, setDataHandler, setFunEvalCount, setLogFileName, setMaxFunEval, setProblem, writeInitialRunLog |
| Methods inherited from class iterator.AbstractIterator |
|---|
isVerbose, printDiagnostics, setVerbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iterator.LoggableIterator |
|---|
getLogFileName, setLogFileName |
| Methods inherited from interface iterator.Iterable |
|---|
isTerminated |
| Constructor Detail |
|---|
public NSGA2()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public iterator.NSGA2.PopulationMember[] getPopulation()
getPopulation in class BasicRealEncodedGA<MultiObjectiveProblem>public int getThreadCount()
public void setThreadCount(int threadCount)
threadCount - the given number of threads.public void init()
Iterable
init in interface Iterableinit in class BasicRealEncodedGA<MultiObjectiveProblem>public void iterate()
Iterable
iterate in interface Iterableiterate in class AbstractOptimizer<MultiObjectiveProblem>public boolean isWriteFrontsToFile()
true if the pareto fronts at each iteration are to be
written to a file.
true if the pareto fronts are to be written to a file.public void setWriteFrontsToFile(boolean writeFrontsToFile)
writeFrontsToFile - set true if fronts are to be written to file.public void singleIteration()
Iterable
singleIteration in interface IterablesingleIteration in class AbstractPopulationOptimizer<MultiObjectiveProblem>
public double[] singleObjectiveSearch(int objectiveIndex,
double fraction)
objectiveIndex - the index of the objective to sort on.fraction - the fraction at which the population member is to be selected.
public iterator.NSGA2.PopulationMember[] sortFrontOn(int objectiveIndex)
objectiveIndex - the index of the objective to sort on.
public void setInitialSamples(cern.colt.matrix.DoubleMatrix2D initialSamples)
setInitialSamples in interface InitialSamplesSettablesetInitialSamples in class AbstractPopulationOptimizer<MultiObjectiveProblem>initialSamples - initial matrix of points, stored row-wise.protected void initializePopulation()
initializePopulation in class BasicRealEncodedGA<MultiObjectiveProblem>protected cern.colt.matrix.DoubleMatrix2D computeNextPoints()
AbstractPopulationOptimizer
computeNextPoints in class AbstractPopulationOptimizer<MultiObjectiveProblem>DoubleMatrix2D containing design points row-wise.protected void evaluatePoints(cern.colt.matrix.DoubleMatrix2D nextPoints)
AbstractPopulationOptimizer
evaluatePoints in class AbstractPopulationOptimizer<MultiObjectiveProblem>nextPoints - the given set of inputs, row-wise.protected void updateDiagnostics()
AbstractIteratordiagnosticString, so that the user has
flexibility over multiple methods accessing this string at different times.
updateDiagnostics in class AbstractOptimizer<MultiObjectiveProblem>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||