|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.pso.dynamic.DynamicIterationStrategy<E>
public class DynamicIterationStrategy<E extends PopulationBasedAlgorithm>
Dynamic iteration strategy for PSO in dynamic environments.
In each iteration, it checks for an environmental change, and reinitialises
a percentage of the swarm once such a change is detected in order to preserve
diversity.
The algorithm is adopted from
Constructor Summary | |
---|---|
DynamicIterationStrategy()
Create a new instance of DynamicIterationStrategy. |
|
DynamicIterationStrategy(DynamicIterationStrategy copy)
Create a copy of the provided instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicIterationStrategy()
The following defaults are set in the constructor: randomiser is instantiated as a MersenneTwister, theta is set to 0.001, reinitialisationRatio is set to 0.5 (reinitialise one half of the swarm)
public DynamicIterationStrategy(DynamicIterationStrategy copy)
copy
- The instance to copy.Method Detail |
---|
public DynamicIterationStrategy<E> getClone()
getClone
in interface IterationStrategy<E extends PopulationBasedAlgorithm>
getClone
in interface Cloneable
Object.clone()
public void performIteration(E algorithm)
IterationStrategy
Due to the nature of the PopulationBasedAlgorithms, the actual manner in which the algorithm's iteration is performed is deferred to the specific iteration strategy being used.
This implies that the general structure of the iteration for a specific flavour of algorithm is constant with modifications on that algorithm being made. For example, within a Genetic Algorithm you would expect:
performIteration
in interface IterationStrategy<E extends PopulationBasedAlgorithm>
algorithm
- The algorithm to perform the iteration process on.Structure of Dynamic iteration strategy with re-initialisation:
- Check for environment change
- If the environment has changed:
- Respond to change
- Perform normal iteration
public IterationStrategy<PopulationBasedAlgorithm> getIterationStrategy()
public void setIterationStrategy(IterationStrategy<PopulationBasedAlgorithm> iterationStrategy)
iterationStrategy
- The value to set.public EnvironmentChangeDetectionStrategy<PopulationBasedAlgorithm> getDetectionStrategy()
public void setDetectionStrategy(EnvironmentChangeDetectionStrategy<PopulationBasedAlgorithm> detectionStrategy)
detectionStrategy
- The EnvironmentChangeDetectionStrategy to set.public EnvironmentChangeResponseStrategy<PopulationBasedAlgorithm> getResponseStrategy()
public void setResponseStrategy(EnvironmentChangeResponseStrategy<PopulationBasedAlgorithm> responseStrategy)
responseStrategy
- The EnvironmentChangeResponseStrategy to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |