net.sourceforge.cilib.pso.dynamic.responsestrategies
Class EnvironmentChangeResponseStrategy<E extends PopulationBasedAlgorithm>

java.lang.Object
  extended by net.sourceforge.cilib.pso.dynamic.responsestrategies.EnvironmentChangeResponseStrategy<E>
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ArchiveReevaluationResponseStrategy, CompetitiveCoevolutionParticleReevaluationResponseStrategy, DualReactionStrategy, NeighbourhoodBestSentriesReactionStrategy, ParticleReevaluationResponseStrategy, ReevaluationReactionStrategy, ReinitializationReactionStrategy

public abstract class EnvironmentChangeResponseStrategy<E extends PopulationBasedAlgorithm>
extends Object
implements Cloneable, Serializable

TODO: Complete this Javadoc.

See Also:
Serialized Form

Field Summary
protected  boolean hasMemory
           
 
Constructor Summary
EnvironmentChangeResponseStrategy()
           
EnvironmentChangeResponseStrategy(EnvironmentChangeResponseStrategy<E> rhs)
           
 
Method Summary
abstract  EnvironmentChangeResponseStrategy<E> getClone()
          Clone the EnvironmentChangeResponseStrategy object.
 boolean getHasMemory()
           
protected abstract  void performReaction(E algorithm)
          This is the method responsible for responding that should be overridden by sub-classes.
 void respond(E algorithm)
          Respond to the environment change and ensure that the neighbourhood best entities are updated.
 void setHasMemory(boolean hasMemory)
           
protected  void updateNeighbourhoodBestEntities(Topology<? extends Entity> topology)
          TODO: The problem with this is that it is PSO specific.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasMemory

protected boolean hasMemory
Constructor Detail

EnvironmentChangeResponseStrategy

public EnvironmentChangeResponseStrategy()

EnvironmentChangeResponseStrategy

public EnvironmentChangeResponseStrategy(EnvironmentChangeResponseStrategy<E> rhs)
Method Detail

getClone

public abstract EnvironmentChangeResponseStrategy<E> getClone()
Clone the EnvironmentChangeResponseStrategy object.

Specified by:
getClone in interface Cloneable
Returns:
A cloned EnvironmentChangeResponseStrategy
See Also:
Object.clone()

respond

public void respond(E algorithm)
Respond to the environment change and ensure that the neighbourhood best entities are updated. This method (Template Method) calls two other methods in turn:

Parameters:
algorithm - some population based algorithm

performReaction

protected abstract void performReaction(E algorithm)
This is the method responsible for responding that should be overridden by sub-classes.

Parameters:
algorithm -

updateNeighbourhoodBestEntities

protected void updateNeighbourhoodBestEntities(Topology<? extends Entity> topology)
TODO: The problem with this is that it is PSO specific. It uses particles instead of entities, because the Entity class does not have the notion of a neighbourhood best.

Parameters:
topology - a topology of particles :-(

getHasMemory

public boolean getHasMemory()

setHasMemory

public void setHasMemory(boolean hasMemory)


Copyright © 2009 CIRG. All Rights Reserved.