|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.algorithm.Algorithm net.sourceforge.cilib.algorithm.MultistartOptimisationAlgorithm
public class MultistartOptimisationAlgorithm
MultistartOptimisationAlgorithm
is simply a wrapper. The wrapped
optimisation algorithm is subject to restart conditions. Each time one of these
conditions is satisfied, the wrapped algorithm is re-initialised and execution continues until
this algorithm's stopping conditions are satisfied.
This class implements a generalised multistart optimisation algorithm. The original Multistart PSO is due to F. van den Bergh, reference: F. van den Bergh, "An Analysis of Particle Swarm Optimizers," PhD thesis, Department of Computer Science, University of Pretoria, South Africa, 2002.
Field Summary |
---|
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
optimisationProblem |
Constructor Summary | |
---|---|
MultistartOptimisationAlgorithm()
Creates a new instance of MultistartOptimisationAlgorithm. |
|
MultistartOptimisationAlgorithm(MultistartOptimisationAlgorithm copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
void |
addRestartCondition(StoppingCondition condition)
Add a stopping condition used to determine when the algorithm should be restarted. |
void |
algorithmIteration()
Perform an algorithm iteration, then restart the Algorithm and increment the number of restarts. |
OptimisationSolution |
getBestSolution()
Get the best current solution. |
MultistartOptimisationAlgorithm |
getClone()
Create a cloned copy of the current object and return it. |
Entity |
getContribution()
Returns contribution to the solution for the co-operative optimisation algorithm. |
Fitness |
getContributionFitness()
Returns the fitness of contribution to the solution. |
OptimisationProblem |
getOptimisationProblem()
Get the specified OptimisationProblem. |
int |
getRestarts()
Returns the number of times that the algorithm has been restarted. |
Fitness |
getSolutionFitness()
Return the fitness of the solution. |
List<OptimisationSolution> |
getSolutions()
Get the collection of best solutions. |
void |
performInitialisation()
Perform the needed initialisation required before the execution of the algorithm starts. |
void |
removeRestartCondition(StoppingCondition condition)
Removes a restart condition. |
void |
setOptimisationProblem(OptimisationProblem problem)
Set the optimisation problem. |
void |
setTargetAlgorithm(Algorithm algorithm)
Sets the target optimisation algorithm that is subject to restarting. |
void |
updateContributionFitness(Fitness fitness)
Updates the new fitness for the solution contribution. |
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getPercentageComplete, getStoppingConditions, initialise, isFinished, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, reset, run, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultistartOptimisationAlgorithm()
public MultistartOptimisationAlgorithm(MultistartOptimisationAlgorithm copy)
copy
- The instance to copy.Method Detail |
---|
public MultistartOptimisationAlgorithm getClone()
getClone
in interface Cloneable
getClone
in class Algorithm
Object.clone()
public void setTargetAlgorithm(Algorithm algorithm)
algorithm
- Any OptimisationAlgorithm
that extends Algorithm
.public OptimisationProblem getOptimisationProblem()
getOptimisationProblem
in class Algorithm
public Fitness getSolutionFitness()
public void setOptimisationProblem(OptimisationProblem problem)
setOptimisationProblem
in class Algorithm
problem
- The problem to set.public Entity getContribution()
getContribution
in interface ParticipatingAlgorithm
public Fitness getContributionFitness()
getContributionFitness
in interface ParticipatingAlgorithm
public void updateContributionFitness(Fitness fitness)
updateContributionFitness
in interface ParticipatingAlgorithm
fitness
- The new fitness of the contribution.public void addRestartCondition(StoppingCondition condition)
Algorithm.addStoppingCondition(StoppingCondition)
on
the algorithm set in #setTargetAlgorithm(OptimisationAlgorithm)
.
indicator
- The StoppingCondition
to be added.public void removeRestartCondition(StoppingCondition condition)
Algorithm.removeStoppingCondition(StoppingCondition)
on
the algorithm set in #setTargetAlgorithm(OptimisationAlgorithm)
.
indicator
- The StoppingCondition
to be removed.public void performInitialisation()
performInitialisation
in class Algorithm
public void algorithmIteration()
algorithmIteration
in class Algorithm
public int getRestarts()
public OptimisationSolution getBestSolution()
getBestSolution
in class Algorithm
OptimisationSolution
representing the best solution.public List<OptimisationSolution> getSolutions()
getSolutions
in class Algorithm
Collection<OptimisationSolution>
containing the solutions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |