protected class SimpleGridMinimizer.Solution extends GeneticAlgorithm implements IterativeMinimizer<Vector>
SimpleGridMinimizer.| Modifier and Type | Field and Description |
|---|---|
protected RealScalarFunction |
f |
protected SimpleCellFactory |
factory |
protected double |
fmin |
protected double |
fminLast |
protected Vector[] |
initials |
protected int |
iteration |
protected int |
nNoChanges |
protected Vector |
xmin |
parallel, population, uniform| Modifier | Constructor and Description |
|---|---|
protected |
Solution(RealScalarFunction f) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.ArrayList<Chromosome> |
initialization()
The initial population is generated by putting a uniform mesh/grid/net over the entire region.
|
protected boolean |
isConverged()
This genetic algorithm terminates if
the minimum does not improve for a fixed number of iterations, or
the maximum number of iterations is exceeded.
|
ImmutableVector |
minimizer()
Get the minimizer (solution) to the minimization problem.
|
double |
minimum()
Get the (approximate) minimum found.
|
Vector |
search(Vector... initials)
Search for a solution that optimizes the objective function from the
given starting points.
|
void |
setInitials(Vector... initials)
Supply the starting points for the search.
|
java.lang.Object |
step()
Run a step in genetic algorithm: produce the next generation of chromosome pool.
|
getBest, getChild, getNewPool, getNextGeneration, getOne, nChildren, nPopulation, runprotected Vector[] initials
protected int iteration
protected int nNoChanges
protected double fminLast
protected double fmin
protected Vector xmin
protected final RealScalarFunction f
protected final SimpleCellFactory factory
protected Solution(RealScalarFunction f)
protected java.util.ArrayList<Chromosome> initialization()
initialization in class GeneticAlgorithmprotected boolean isConverged()
isConverged in class GeneticAlgorithmtrue if a convergence is foundpublic void setInitials(Vector... initials)
IterativeMethodsetInitials in interface IterativeMethod<Vector>initials - the initial guessespublic java.lang.Object step()
GeneticAlgorithmstep in interface IterativeMethod<Vector>step in class GeneticAlgorithmpublic Vector search(Vector... initials)
IterativeMethod#setInitials(S[]) and then
iteratively IterativeMethod.step().
It implements a default convergence criterion.search in interface IterativeMethod<Vector>initials - the initial guessespublic double minimum()
MinimizationSolutionminimum in interface MinimizationSolution<Vector>public ImmutableVector minimizer()
MinimizationSolutionminimizer in interface MinimizationSolution<Vector>