|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.swarm.ParticleSwarmOptimizationAlgorithm
public final class ParticleSwarmOptimizationAlgorithm
Particle swarm optimization (PSO) algorithm function.
| Field Summary | |
|---|---|
static double |
DEFAULT_COGNITIVE_WEIGHT
Default cognitive weight. |
static double |
DEFAULT_INERTIA_WEIGHT
Default inertia weight. |
static double |
DEFAULT_MAXIMUM_POSITION
Default maximum position. |
static double |
DEFAULT_MAXIMUM_VELOCITY
Default maximum velocity. |
static double |
DEFAULT_MINIMUM_POSITION
Default minimum position. |
static double |
DEFAULT_MINIMUM_VELOCITY
Default minimum velocity. |
static double |
DEFAULT_SOCIAL_WEIGHT
Default social weight. |
| Constructor Summary | |
|---|---|
ParticleSwarmOptimizationAlgorithm()
Create a new particle swarm optimization algorithm function with default parameters. |
|
| Method Summary | |
|---|---|
void |
addParticleSwarmOptimizationAlgorithmListener(ParticleSwarmOptimizationAlgorithmListener l)
Add the specified particle swarm optimization algorithm listener. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this particle swarm optimization algorithm. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a property change listener for the specified property to this particle swarm optimization algorithm. |
double |
getCognitiveWeight()
Return the cognitive weight for this particle swarm optimization algorithm. |
double |
getInertiaWeight()
Return the inertia weight for this particle swarm optimization algorithm. |
double |
getMaximumPosition()
Return the maximum position for this particle swarm optimization algorithm. |
double |
getMaximumVelocity()
Return the maximum velocity for this particle swarm optimization algorithm. |
double |
getMinimumPosition()
Return the minimum position for this particle swarm optimization algorithm. |
double |
getMinimumVelocity()
Return the minimum velocity for this particle swarm optimization algorithm. |
int |
getParticleSwarmOptimizationAlgorithmListenerCount()
Return the number of particle swarm optimization algorithm listeners registered to this particle swarm optimization algorithm. |
ParticleSwarmOptimizationAlgorithmListener[] |
getParticleSwarmOptimizationAlgorithmListeners()
Return an array of particle swarm optimization algorithm listeners registered to this particle swarm optimization algorithm. |
int |
getPropertyChangeListenerCount()
Return the number of property change listeners registered to this particle swarm optimization algorithm. |
int |
getPropertyChangeListenerCount(String propertyName)
Return the number of property change listeners registered to this particle swarm optimization algorithm for the specified property. |
PropertyChangeListener[] |
getPropertyChangeListeners()
Return an array of property change listeners registered to this particle swarm optimization algorithm. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Return an array of property change listeners registered to this particle swarm optimization algorithm for the specified property. |
Random |
getRandom()
Return the source of randomness for this particle swarm optimization algorithm. |
double |
getSocialWeight()
Return the social weight for this particle swarm optimization algorithm. |
ParticleSwarm |
optimize(int particles,
int dimensions,
ExitStrategy exitStrategy,
Fitness fitness)
Optimize a particle swarm of the specified size over the specified number of dimensions given the specified exit strategy and fitness functions. |
void |
removeParticleSwarmOptimizationAlgorithmListener(ParticleSwarmOptimizationAlgorithmListener l)
Remove the specified particle swarm optimization algorithm listener. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this particle swarm optimization algorithm. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a property change listener for the specified property from this particle swarm optimization algorithm. |
void |
setCognitiveWeight(double cognitiveWeight)
Set the cognitive weight for this particle swarm optimization algorithm to cognitiveWeight. |
void |
setInertiaWeight(double inertiaWeight)
Set the inertia weight for this particle swarm optimization algorithm to inertiaWeight. |
void |
setMaximumPosition(double maximumPosition)
Set the maximum position for this particle swarm optimization algorithm to maximumPosition. |
void |
setMaximumVelocity(double maximumVelocity)
Set the maximum velocity for this particle swarm optimization algorithm to maximumVelocity. |
void |
setMinimumPosition(double minimumPosition)
Set the minimum position for this particle swarm optimization algorithm to minimumPosition. |
void |
setMinimumVelocity(double minimumVelocity)
Set the minimum velocity for this particle swarm optimization algorithm to minimumVelocity. |
void |
setRandom(Random random)
Set the source of randomness for this particle swarm optimization algorithm to random. |
void |
setSocialWeight(double socialWeight)
Set the social weight for this particle swarm optimization algorithm to socialWeight. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_INERTIA_WEIGHT
public static final double DEFAULT_COGNITIVE_WEIGHT
public static final double DEFAULT_SOCIAL_WEIGHT
public static final double DEFAULT_MINIMUM_POSITION
public static final double DEFAULT_MAXIMUM_POSITION
public static final double DEFAULT_MINIMUM_VELOCITY
public static final double DEFAULT_MAXIMUM_VELOCITY
| Constructor Detail |
|---|
public ParticleSwarmOptimizationAlgorithm()
| Method Detail |
|---|
public ParticleSwarm optimize(int particles,
int dimensions,
ExitStrategy exitStrategy,
Fitness fitness)
Returns a 2D matrix of particle positions with the specified number of particles as rows and the specified number of dimensions as columns.
particles - number of particles, must be >= 1dimensions - number of dimensions, must be >= 1exitStrategy - exit strategy function, must not be nullfitness - fitness function, must not be null
particles
rows and dimensions columnspublic Random getRandom()
public void setRandom(Random random)
random.
This is a bound property.
random - source of randomness for this particle swarm
optimization algorithm, must not be nullpublic double getInertiaWeight()
0.1d.
DEFAULT_INERTIA_WEIGHTpublic void setInertiaWeight(double inertiaWeight)
inertiaWeight.
This is a bound property.
inertiaWeight - inertia weight for this particle swarm optimization algorithmpublic double getCognitiveWeight()
0.2d.
DEFAULT_COGNITIVE_WEIGHTpublic void setCognitiveWeight(double cognitiveWeight)
cognitiveWeight.
This is a bound property.
cognitiveWeight - cognitive weight for this particle swarm optimization algorithmpublic double getSocialWeight()
0.2d.
DEFAULT_SOCIAL_WEIGHTpublic void setSocialWeight(double socialWeight)
socialWeight.
This is a bound property.
socialWeight - social weight for this particle swarm optimization algorithmpublic double getMinimumPosition()
0.0d.
DEFAULT_MINIMUM_POSITIONpublic void setMinimumPosition(double minimumPosition)
minimumPosition.
This is a bound property.
minimumPosition - minimum position for this particle swarm optimization algorithmpublic double getMaximumPosition()
1.0d.
DEFAULT_MAXIMUM_POSITIONpublic void setMaximumPosition(double maximumPosition)
maximumPosition.
This is a bound property.
maximumPosition - maximum position for this particle swarm optimization algorithmpublic double getMinimumVelocity()
-0.5d.
DEFAULT_MINIMUM_VELOCITYpublic void setMinimumVelocity(double minimumVelocity)
minimumVelocity.
This is a bound property.
minimumVelocity - maximum velocity for this particle swarm optimization algorithmpublic double getMaximumVelocity()
Double.MAX_VALUE.
DEFAULT_MAXIMUM_VELOCITYpublic void setMaximumVelocity(double maximumVelocity)
maximumVelocity.
This is a bound property.
maximumVelocity - maximum velocity for this particle swarm optimization algorithmpublic void addParticleSwarmOptimizationAlgorithmListener(ParticleSwarmOptimizationAlgorithmListener l)
l - particle swarm optimization algorithm listener to addpublic void removeParticleSwarmOptimizationAlgorithmListener(ParticleSwarmOptimizationAlgorithmListener l)
l - particle swarm optimization algorithm listener to addpublic int getParticleSwarmOptimizationAlgorithmListenerCount()
public ParticleSwarmOptimizationAlgorithmListener[] getParticleSwarmOptimizationAlgorithmListeners()
public void addPropertyChangeListener(PropertyChangeListener listener)
listener - property change listener to add
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
propertyName - specific property namelistener - property change listener to addpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener - property change listener to remove
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
propertyName - specific property namelistener - property change listener to removepublic int getPropertyChangeListenerCount()
public int getPropertyChangeListenerCount(String propertyName)
propertyName - property name
public PropertyChangeListener[] getPropertyChangeListeners()
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
propertyName - property name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||