net.sourceforge.cilib.cooperative
Class HybridCooperativeAlgorithm

java.lang.Object
  extended by net.sourceforge.cilib.algorithm.Algorithm
      extended by net.sourceforge.cilib.algorithm.population.PopulationBasedAlgorithm
          extended by net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm
              extended by net.sourceforge.cilib.cooperative.HybridCooperativeAlgorithm
All Implemented Interfaces:
Serializable, Iterable<PopulationBasedAlgorithm>, Runnable, ParticipatingAlgorithm, Cloneable

public class HybridCooperativeAlgorithm
extends MultiPopulationBasedAlgorithm
implements ParticipatingAlgorithm

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm
algorithmIterator, subPopulationsAlgorithms
 
Fields inherited from class net.sourceforge.cilib.algorithm.Algorithm
optimisationProblem
 
Constructor Summary
HybridCooperativeAlgorithm()
          Create a new instance of HybridCooperativeAlgorithm.
HybridCooperativeAlgorithm(HybridCooperativeAlgorithm copy)
          Copy constructor.
 
Method Summary
 void algorithmIteration()
          The actual operations that the current Algorithm performs within a single iteration.
 OptimisationSolution getBestSolution()
          Get the best current solution.
 HybridCooperativeAlgorithm 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.
 List<OptimisationSolution> getSolutions()
          Get the collection of best solutions.
 void setOptimisationProblem(OptimisationProblem problem)
          Set the optimisation problem to be solved.
 void updateContributionFitness(Fitness fitness)
          Updates the new fitness for the solution contribution.
 
Methods inherited from class net.sourceforge.cilib.algorithm.population.MultiPopulationBasedAlgorithm
accept, addPopulationBasedAlgorithm, getAlgorithmIterator, getInitialisationStrategy, getPopulations, getTopology, iterator, removePopulationBasedalgorithm, reset, setAlgorithmIterator, setInitialisationStrategy, setPopulations
 
Methods inherited from class net.sourceforge.cilib.algorithm.Algorithm
addAlgorithmListener, addStoppingCondition, get, getAlgorithmList, getIterations, getPercentageComplete, getStoppingConditions, initialise, isFinished, performInitialisation, performIteration, performUninitialisation, removeAlgorithmListener, removeStoppingCondition, run, terminate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HybridCooperativeAlgorithm

public HybridCooperativeAlgorithm()
Create a new instance of HybridCooperativeAlgorithm.


HybridCooperativeAlgorithm

public HybridCooperativeAlgorithm(HybridCooperativeAlgorithm copy)
Copy constructor. Create a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public HybridCooperativeAlgorithm getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class PopulationBasedAlgorithm
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getBestSolution

public OptimisationSolution getBestSolution()
Get the best current solution. This best solution is determined from the personal bests of the particles.

Specified by:
getBestSolution in class PopulationBasedAlgorithm
Returns:
The OptimisationSolution representing the best solution.

getOptimisationProblem

public OptimisationProblem getOptimisationProblem()
Get the specified OptimisationProblem.

Overrides:
getOptimisationProblem in class Algorithm
Returns:
The specified OptimisationProblem.

getSolutions

public List<OptimisationSolution> getSolutions()
Get the collection of best solutions. This result does not actually make sense in the normal PSO algorithm, but rather in a MultiObjective optimization.

Specified by:
getSolutions in class PopulationBasedAlgorithm
Returns:
The Collection<OptimisationSolution> containing the solutions.

setOptimisationProblem

public void setOptimisationProblem(OptimisationProblem problem)
Set the optimisation problem to be solved. By default, the problem is null. That is, it is necessary to set the optimisation problem before calling Algorithm.initialise().

Overrides:
setOptimisationProblem in class Algorithm
Parameters:
problem - An implementation of the OptimisationProblemAdapter interface.

getContribution

public Entity getContribution()
Returns contribution to the solution for the co-operative optimisation algorithm.

Specified by:
getContribution in interface ParticipatingAlgorithm
Returns:
The algorithm's solution contribution.

getContributionFitness

public Fitness getContributionFitness()
Returns the fitness of contribution to the solution.

Specified by:
getContributionFitness in interface ParticipatingAlgorithm
Returns:
The fitness of the solution contribution.

updateContributionFitness

public void updateContributionFitness(Fitness fitness)
Updates the new fitness for the solution contribution.

Specified by:
updateContributionFitness in interface ParticipatingAlgorithm
Parameters:
fitness - The new fitness of the contribution.

algorithmIteration

public void algorithmIteration()
The actual operations that the current Algorithm performs within a single iteration.

Specified by:
algorithmIteration in class MultiPopulationBasedAlgorithm


Copyright © 2009 CIRG. All Rights Reserved.