|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgenopt.algorithm.Optimizer
genopt.algorithm.util.pso.ModelPSO
public abstract class ModelPSO
Abstract class with model Particle Swarm Optimization algorithm.
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2011, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
| Field Summary | |
|---|---|
protected double |
CogAcc
Acceleration constant for cognitive component |
protected Point[] |
CurPop
Current population |
protected int |
dimCon
The number of independent continuous variables |
protected int |
dimDis
The number of independent discrete variables |
protected int |
dimF
The number of function values |
private static int |
GBEST
Constant to denote the gbest neighborhood topology |
protected Point[] |
GloBes
Global best particles |
protected int |
IGen
Number of the current generation |
private static int |
LBEST
Constant to denote the lbest neighborhood topology |
protected int[] |
LenBitStr
Length of the bit string used to encode each component of the discrete parameters |
protected Point[] |
LocBes
Local best particles |
protected double |
MaxVelDis
Maximum velocity for discrete parameter |
private double |
MaxVelGaiCon
Gain for maximal velocity of continuous parameters |
private int[][] |
NeiHooInd
Index with neighborhood points for each particle |
private int |
NeiHooSiz
Neighborhood size |
private int |
NeiHooTop
Neighborhood topology |
protected int |
NumGen
The number of generations |
protected int |
NumPar
The number of particles |
protected java.util.Random |
RanGen
Random number generator |
protected double |
SocAcc
Acceleration constant for social component |
protected double[][] |
VelCon
Velocity of the continuous particles |
protected double[][][] |
VelDis
Velocity of the discrete particles |
protected double[] |
VelMaxCon
Maximum velocity for each component of the continuous parameter |
private static int |
VONNEUMANN
Constant to denote the von Neumann neighborhood topology |
| Fields inherited from class genopt.algorithm.Optimizer |
|---|
done, EXCLUDING, FS, INCLUDING, LS, MAINITERATION, ORIGINAL, SUBITERATION, TRANSFORMED |
| Constructor Summary | |
|---|---|
ModelPSO(GenOpt genOptData)
Constructor |
|
| Method Summary | |
|---|---|
private int |
_getVonNeumannIndex(int i,
int j,
int offSet)
Computes the index of a point used in the von Neumann neighborhood |
protected static double |
clampVelocity(double velocity,
double max)
Clamps the velocity |
private void |
initializeCurrentPopulation(Point x0)
Initializes the current population |
private void |
initializeNeighborhoodIndices()
Initializes the neighborhood indices for each particle |
int |
run(Point x0)
Runs the optimization process until a termination criteria is satisfied |
private void |
updateGlobalBest()
Updates the global best particles based on the local best particles |
private void |
updateLocalBest()
Updates the local best particles based on the current population |
private void |
updateParticleLocation()
Updates the particle location |
protected abstract void |
updateVelocity()
Updates the particle velocity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int GBEST
private static final int LBEST
private static final int VONNEUMANN
private int NeiHooTop
private int NeiHooSiz
private int[][] NeiHooInd
protected int dimCon
protected int dimDis
protected int[] LenBitStr
protected int dimF
protected int NumPar
protected int NumGen
protected int IGen
protected java.util.Random RanGen
protected double CogAcc
protected double SocAcc
private double MaxVelGaiCon
protected double MaxVelDis
protected double[] VelMaxCon
protected double[][] VelCon
protected double[][][] VelDis
protected Point[] CurPop
protected Point[] LocBes
protected Point[] GloBes
| Constructor Detail |
|---|
public ModelPSO(GenOpt genOptData)
throws OptimizerException,
java.io.IOException,
java.lang.Exception,
InputFormatException
genOptData - a reference to the GenOpt object.OptimizerException - if an OptimizerException occurs or
if the user required to stop GenOpt
SimulationInputException - if an error in writing the
simulation input file occurs
java.lang.NoSuchMethodException - if a method that should be invoked could not be found
java.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessible
InvocationTargetException - if an invoked method throws an exception
java.lang.Exception - if an I/O error in the simulation input file occurs
java.io.IOException
InputFormatException| Method Detail |
|---|
public int run(Point x0)
throws SimulationInputException,
OptimizerException,
java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.Exception
run in class Optimizerx0 - Initial point
-1 if the maximum number of iteration
is exceeded
+1 if the required accuracy is reached
OptimizerException - if an OptimizerException occurs or
if the user required to stop GenOpt
SimulationInputException - if an error in writing the
simulation input file occurs
java.lang.NoSuchMethodException - if a method that should be invoked could not be found
java.lang.IllegalAccessException - if an invoked method enforces Java language access
control and the underlying method is inaccessible
InvocationTargetException - if an invoked method throws an exception
java.lang.Exception - if an I/O error in the simulation input file occursprivate void updateParticleLocation()
protected abstract void updateVelocity()
protected static final double clampVelocity(double velocity,
double max)
velocity - particle velocitymax - maximum absolute value of the velocity. If max <= 0
then the value of velocity is returned.
private void updateGlobalBest()
private final void updateLocalBest()
private void initializeCurrentPopulation(Point x0)
x0 - Initial pointprivate void initializeNeighborhoodIndices()
private final int _getVonNeumannIndex(int i,
int j,
int offSet)
i - zero-based row indexj - zero-based column indexoffSet - off set of index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||