|
||||||||||
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.MultiPopulationBasedAlgorithm net.sourceforge.cilib.cooperative.SplitCooperativeAlgorithm
public class SplitCooperativeAlgorithm
TODO test this class This class forms that basis for any co-operative optimisation
implementations. Any algorithm that wishes to participate in a co-operative optimisation
algorithm must implement the ParticipatingAlgorithm
interface. This class also implements
ParticipatingAlgorithm
meaning that co-operative algorithms can be composed of
co-operative algorithms again.
Field Summary | |
---|---|
protected CooperativeEntity |
context
|
protected ContributionUpdateStrategy |
contributionUpdateStrategy
|
protected FitnessUpdateStrategy |
fitnessUpdateStrategy
|
protected SplitStrategy |
splitStrategy
|
Fields inherited from class net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm |
---|
algorithmIterator, subPopulationsAlgorithms |
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
optimisationProblem |
Constructor Summary | |
---|---|
SplitCooperativeAlgorithm()
Creates a new instance of a SplitCooperativeAglorithm. |
|
SplitCooperativeAlgorithm(SplitCooperativeAlgorithm copy)
|
Method Summary | |
---|---|
void |
addPopulationBasedAlgorithm(PopulationBasedAlgorithm algorithm)
Add a PopulationBasedAlgorithm to the list of maintained sub-populations. |
void |
algorithmIteration()
The actual operations that the current Algorithm performs within a single iteration. |
OptimisationSolution |
getBestSolution()
Get the best current solution. |
SplitCooperativeAlgorithm |
getClone()
Create a cloned copy of the current object and return it. |
CooperativeEntity |
getContext()
|
Entity |
getContribution()
Returns contribution to the solution for the co-operative optimisation algorithm. |
Fitness |
getContributionFitness()
Returns the fitness of contribution to the solution. |
ContributionUpdateStrategy |
getContributionUpdateStrategy()
|
FitnessUpdateStrategy |
getFitnessUpdateStrategy()
|
int |
getNumberOfParticipants()
|
List<OptimisationSolution> |
getSolutions()
Get the collection of best solutions. |
SplitStrategy |
getSplitStrategy()
|
void |
performInitialisation()
Perform the needed initialisation required before the execution of the algorithm starts. |
void |
performUninitialisation()
Perform the needed unintialisation steps after the algorithm completes it's execution. |
void |
reset()
Reset the Algorithm internals if needed. |
void |
setContext(CooperativeEntity c)
|
void |
setContributionUpdateStrategy(ContributionUpdateStrategy contributionUpdate)
|
void |
setFitnessUpdateStrategy(FitnessUpdateStrategy fitnessUpdate)
|
void |
setSplitStrategy(SplitStrategy split)
|
void |
updateContributionFitness(Fitness fitness)
The purpose of this method should not be confused with the ContributionUpdateStrategy. |
Methods inherited from class net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm |
---|
accept, getAlgorithmIterator, getInitialisationStrategy, getPopulations, getTopology, iterator, removePopulationBasedalgorithm, setAlgorithmIterator, setInitialisationStrategy, setPopulations |
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm |
---|
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getOptimisationProblem, getPercentageComplete, getStoppingConditions, initialise, isFinished, performIteration, removeAlgorithmListener, removeStoppingCondition, run, setOptimisationProblem, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CooperativeEntity context
protected SplitStrategy splitStrategy
protected FitnessUpdateStrategy fitnessUpdateStrategy
protected ContributionUpdateStrategy contributionUpdateStrategy
Constructor Detail |
---|
public SplitCooperativeAlgorithm()
public SplitCooperativeAlgorithm(SplitCooperativeAlgorithm copy)
Method Detail |
---|
public SplitCooperativeAlgorithm getClone()
PopulationBasedAlgorithm
getClone
in interface Cloneable
getClone
in class PopulationBasedAlgorithm
Object.clone()
public void reset()
MultiPopulationBasedAlgorithm
reset
in class MultiPopulationBasedAlgorithm
public OptimisationSolution getBestSolution()
PopulationBasedAlgorithm
getBestSolution
in class PopulationBasedAlgorithm
OptimisationSolution
representing the best solution.public List<OptimisationSolution> getSolutions()
PopulationBasedAlgorithm
getSolutions
in class PopulationBasedAlgorithm
Collection<OptimisationSolution>
containing the solutions.public CooperativeEntity getContext()
public void setContext(CooperativeEntity c)
public void addPopulationBasedAlgorithm(PopulationBasedAlgorithm algorithm)
MultiPopulationBasedAlgorithm
addPopulationBasedAlgorithm
in class MultiPopulationBasedAlgorithm
algorithm
- The PopulationBasedAlgorithm to add to the current collection.public int getNumberOfParticipants()
public SplitStrategy getSplitStrategy()
public void setSplitStrategy(SplitStrategy split)
public ContributionUpdateStrategy getContributionUpdateStrategy()
public void setContributionUpdateStrategy(ContributionUpdateStrategy contributionUpdate)
public Entity getContribution()
ParticipatingAlgorithm
getContribution
in interface ParticipatingAlgorithm
public Fitness getContributionFitness()
ParticipatingAlgorithm
getContributionFitness
in interface ParticipatingAlgorithm
public void updateContributionFitness(Fitness fitness)
updateContributionFitness
in interface ParticipatingAlgorithm
fitness
- The new fitness of the contribution.public FitnessUpdateStrategy getFitnessUpdateStrategy()
public void setFitnessUpdateStrategy(FitnessUpdateStrategy fitnessUpdate)
public void performInitialisation()
Algorithm
performInitialisation
in class Algorithm
public void performUninitialisation()
Algorithm
performUninitialisation
in class Algorithm
public void algorithmIteration()
MultiPopulationBasedAlgorithm
algorithmIteration
in class MultiPopulationBasedAlgorithm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |