|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Subpopulation
ec.pso.PSOSubpopulation
public class PSOSubpopulation
PSOSubpopulation.java
Particle Swarm Optimization (PSO) is a population-oriented stochastic search technique similar to genetic algorithms, evolutionary strategies, and other evolutionary computation algorithms. The technique discovers solutions for N-dimensional parameterized problems: basically it discovers the point in N-dimensional space which maximizes some quality function.
PSOSubpopulation handles initialization and input/output of the swarm.
Parameters
base.neighborhood-size integer |
(the number of individuals per neighborhood) |
base.clamp boolean |
(clamp the individual to stay within the bounds or not) |
base.initial-velocity-scale double |
(particles are initialized with a random velocity and this value provides bounds.
A value of 1.0 means that the velocity will be within +/- the range of the genotype.) |
base.velocity-multiplier double |
(particle velocities are multiplied by this value before the particle is updated.
Increasing this value helps particles to escape local optima, but slows convergence. The default
value of 1.5 is geared toward multi-modal landscapes.) |
Parameter bases
base.data | Subpopulation |
Field Summary | |
---|---|
boolean |
clampRange
|
static java.lang.String |
GLOBAL_BEST_PREAMBLE
|
DoubleVectorIndividual |
globalBest
|
static java.lang.String |
INDIVIDUAL_EXISTS_PREAMBLE
|
double |
initialVelocityScale
|
static java.lang.String |
NEIGHBORHOOD_BEST_PREAMBLE
|
DoubleVectorIndividual[] |
neighborhoodBests
|
int |
neighborhoodSize
|
static java.lang.String |
P_CLAMP_RANGE
|
static java.lang.String |
P_INITIAL_VELOCITY_SCALE
|
static java.lang.String |
P_NEIGHBORHOOD_SIZE
|
static java.lang.String |
P_VELOCITY_MULTIPLIER
|
static java.lang.String |
PERSONAL_BEST_PREAMBLE
|
DoubleVectorIndividual[] |
personalBests
|
static java.lang.String |
PREVIOUS_INDIVIDUAL_PREAMBLE
|
DoubleVectorIndividual[] |
previousIndividuals
|
double |
velocityMultiplier
|
Fields inherited from class ec.Subpopulation |
---|
INDIVIDUAL_INDEX_PREAMBLE, individuals, loadInds, NUM_INDIVIDUALS_PREAMBLE, numDuplicateRetries, P_FILE, P_RETRIES, P_SPECIES, P_SUBPOPSIZE, species |
Constructor Summary | |
---|---|
PSOSubpopulation()
|
Method Summary | |
---|---|
void |
populate(EvolutionState state,
int thread)
|
void |
printSubpopulation(EvolutionState state,
int log,
int verbosity)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
void |
printSubpopulation(EvolutionState state,
java.io.PrintWriter writer)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
void |
printSubpopulationForHumans(EvolutionState state,
int log,
int verbosity)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
void |
readSubpopulation(EvolutionState state,
java.io.DataInput dataInput)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
void |
readSubpopulation(EvolutionState state,
java.io.LineNumberReader reader)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
void |
writeSubpopulation(EvolutionState state,
java.io.DataOutput dataOutput)
Overridden to include the global best, neighborhood bests, personal bests, and previous individuals in the stream. |
Methods inherited from class ec.Subpopulation |
---|
emptyClone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int neighborhoodSize
public static final java.lang.String P_NEIGHBORHOOD_SIZE
public boolean clampRange
public static final java.lang.String P_CLAMP_RANGE
public double initialVelocityScale
public static final java.lang.String P_INITIAL_VELOCITY_SCALE
public double velocityMultiplier
public static final java.lang.String P_VELOCITY_MULTIPLIER
public DoubleVectorIndividual globalBest
public DoubleVectorIndividual[] neighborhoodBests
public DoubleVectorIndividual[] personalBests
public DoubleVectorIndividual[] previousIndividuals
public static final java.lang.String GLOBAL_BEST_PREAMBLE
public static final java.lang.String NEIGHBORHOOD_BEST_PREAMBLE
public static final java.lang.String PERSONAL_BEST_PREAMBLE
public static final java.lang.String PREVIOUS_INDIVIDUAL_PREAMBLE
public static final java.lang.String INDIVIDUAL_EXISTS_PREAMBLE
Constructor Detail |
---|
public PSOSubpopulation()
Method Detail |
---|
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class Subpopulation
public void populate(EvolutionState state, int thread)
populate
in class Subpopulation
public void printSubpopulationForHumans(EvolutionState state, int log, int verbosity)
printSubpopulationForHumans
in class Subpopulation
public void printSubpopulation(EvolutionState state, int log, int verbosity)
printSubpopulation
in class Subpopulation
public void printSubpopulation(EvolutionState state, java.io.PrintWriter writer)
printSubpopulation
in class Subpopulation
public void readSubpopulation(EvolutionState state, java.io.LineNumberReader reader) throws java.io.IOException
readSubpopulation
in class Subpopulation
java.io.IOException
public void writeSubpopulation(EvolutionState state, java.io.DataOutput dataOutput) throws java.io.IOException
writeSubpopulation
in class Subpopulation
java.io.IOException
public void readSubpopulation(EvolutionState state, java.io.DataInput dataInput) throws java.io.IOException
readSubpopulation
in class Subpopulation
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |