|
||||||||||
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.population.PopulationBasedAlgorithm net.sourceforge.cilib.algorithm.population.SinglePopulationBasedAlgorithm net.sourceforge.cilib.pso.PSO
public class PSO
An implementation of the standard PSO algorithm.
References:
Field Summary |
---|
Fields inherited from class net.sourceforge.cilib.algorithm.population.SinglePopulationBasedAlgorithm |
---|
initialisationStrategy |
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
optimisationProblem |
Constructor Summary | |
---|---|
PSO()
Creates a new instance of PSO . |
|
PSO(PSO copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
protected void |
algorithmIteration()
Perform the iteration of the PSO algorithm, use the appropriate IterationStrategy
to perform the iteration. |
OptimisationSolution |
getBestSolution()
Get the best current solution. |
PSO |
getClone()
Create a cloned copy of the current object and return it. |
Particle |
getContribution()
Returns contribution to the solution for the co-operative optimisation algorithm. |
Fitness |
getContributionFitness()
Returns the fitness of contribution to the solution. |
IterationStrategy<PSO> |
getIterationStrategy()
Get the IterationStrategy of the PSO algorithm. |
List<OptimisationSolution> |
getSolutions()
Get the collection of best solutions. |
Topology<Particle> |
getTopology()
Accessor for the topology being used. |
void |
performInitialisation()
Perform the required initialisation for the algorithm. |
void |
reset()
Reset the Algorithm internals if needed. |
void |
setIterationStrategy(IterationStrategy<PSO> iterationStrategy)
Set the IterationStrategy to be used. |
void |
setTopology(Topology topology)
Sets the particle topology used. |
void |
updateContributionFitness(Fitness fitness)
Updates the new fitness for the solution contribution. |
Methods inherited from class net.sourceforge.cilib.algorithm.population.SinglePopulationBasedAlgorithm |
---|
accept, getInitialisationStrategy, setInitialisationStrategy |
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getOptimisationProblem, getPercentageComplete, getStoppingConditions, initialise, isFinished, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, run, setOptimisationProblem, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PSO()
PSO
. All fields are initialised to reasonable
defaults. Note that the OptimisationProblem
is initially
null
and must be set before Algorithm.initialise()
is called.
public PSO(PSO copy)
copy
- The instance to copy.Method Detail |
---|
public PSO getClone()
getClone
in interface Cloneable
getClone
in class SinglePopulationBasedAlgorithm
Object.clone()
public void reset()
reset
in class Algorithm
public void performInitialisation()
performInitialisation
in class Algorithm
protected void algorithmIteration()
IterationStrategy
to perform the iteration.
algorithmIteration
in class SinglePopulationBasedAlgorithm
public OptimisationSolution getBestSolution()
getBestSolution
in class PopulationBasedAlgorithm
OptimisationSolution
representing the best solution.public List<OptimisationSolution> getSolutions()
getSolutions
in class PopulationBasedAlgorithm
Collection<OptimisationSolution>
containing the solutions.public void setTopology(Topology topology)
GBestTopology
.
setTopology
in class SinglePopulationBasedAlgorithm
topology
- A class that implements the Topology
interface.public Topology<Particle> getTopology()
getTopology
in class SinglePopulationBasedAlgorithm
Topology
being used.public Particle getContribution()
ParticipatingAlgorithm
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 IterationStrategy<PSO> getIterationStrategy()
IterationStrategy
of the PSO algorithm.
public void setIterationStrategy(IterationStrategy<PSO> iterationStrategy)
IterationStrategy
to be used.
iterationStrategy
- The iterationStrategy to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |