highprecisionpso Namespace Reference

base namespace for this project. More...

Namespaces

 configuration
 Contains the variables which store information about the configuration for the particle swarm optimization algorithm (PSO).
 
 parse
 Contains a large set of functions for parsing the configuration file.
 
 visualization
 This namespace contains functionality to visualize the particle swarm.
 

Classes

class  AbsOperation
 This operation calculates the absolute value of the supplied value. More...
 
class  AddOperation
 This pair combination operation reduces two values by addition. More...
 
class  AdjacencyListNeighborhood
 This class is an abstract class, which implements a complete neighborhood topology through a neighborhood relationship specified by adjacency lists. More...
 
class  ArccosOperation
 This operation calculates the arccosine function of the supplied value. More...
 
class  ArcsinOperation
 This operation calculates the arcsine function of the supplied value. More...
 
class  ArctanOperation
 This operation calculates the arctangent function of the supplied value. More...
 
class  ArithmeticAverageReduceOperation
 This vector reduce operation reduces a vector by calculation of its arithmetic average. More...
 
class  BoundHandling
 This class is an abstract class. It supplies the interface for bound handling strategies of the particle swarm optimization algorithm. More...
 
class  BoundHandlingAbsorption
 This class implements the bound handling strategy absorption for the particle swarm optimization. More...
 
class  BoundHandlingHyperbolic
 This class implements the bound handling strategy hyperbolic for the particle swarm optimization. More...
 
class  BoundHandlingNearest
 This class implements the bound handling strategy nearest for the particle swarm optimization. More...
 
class  BoundHandlingNoBounds
 This class implements the bound handling strategy no bounds for the particle swarm optimization. More...
 
class  BoundHandlingRandom
 This class implements the bound handling strategy random for the particle swarm optimization. More...
 
class  BoundHandlingRandomForth
 This class implements the bound handling strategy random forth for the particle swarm optimization. More...
 
class  BoundHandlingReflect
 This class implements the bound handling strategy reflect for the particle swarm optimization. More...
 
class  BoundHandlingTorus
 This class implements the bound handling strategy torus for the particle swarm optimization. More...
 
class  CombineFunction
 This class implements a function which combines two functions with an operation. More...
 
class  CombineSpecificFunction
 This class implements a specific function, which combines two specific functions with an operation. More...
 
class  CombineSpecificStatisticalEvaluation
 This class implements a specific statistical evaluation, which combines two specific statistical evaluations by a combination operation. More...
 
class  CombineStatistic
 This class implements a statistic, which combines two statistics by a combination operation. More...
 
class  ComposedDimensionReduceOperation
 This class implements a reduce operation, which reduces the values of all dimensions to a single value. More...
 
class  ComposedParticleReduceOperation
 This class implements a reduce operation, which reduces the values of all particles to a single value. More...
 
class  ComposedStatisticReduceOperation
 This class is an abstract class. Additionally to the statistic reduce operation it stores a vector reduce operation, which determines how specific statistical evaluations should be reduced. More...
 
class  ConstantEvaluation
 This class is an abstract class. It supplies the interface for generating a constant value. More...
 
class  ConstantFunction
 This class implements a specific function with an evaluation function that always evaluates to a vector of a predefined constant. More...
 
class  ConstantSpecificFunction
 This class implements a specific function with an evaluation function that always evaluates to a vector of a predefined constant. More...
 
class  ConstantSpecificStatisticalEvaluation
 This class implements a specific statistical evaluation, which always evaluates to the same value. More...
 
class  ConstantStatistic
 This class implements a statistic, which always evaluates to the same value. More...
 
class  CosOperation
 This operation calculates the cosine function of the supplied value. More...
 
class  DefaultUpdater
 This class implements the standard movement equations for particle swarm optimization. More...
 
class  DeltaUpdateCounterEvaluation
 This class implements a specific statistical evaluation, which supplies the number of delta updates if a DeltaUpdater is used. More...
 
class  DeltaUpdater
 The delta updater implements a specific position and velocity update procedure. More...
 
class  DeltaUpdaterTCS
 The delta updater implements a specific position and velocity update procedure. More...
 
class  DiagonalFunction
 This class implements the diagonal function, which represents a function with optimum at the origin and constant second derivative matrix. More...
 
class  DimensionIndependentUpdater
 This class implements an update procedure, which acts independent to the coordinate axes. More...
 
class  DistTo1DOptimumOperation
 This vector operation calculates for each dimension the distance to the nearest 1-dimensional local optimum. More...
 
class  DivideOperation
 This pair combination operation reduces two values by division. More...
 
class  DoubleConstantEvaluation
 This constant evaluation can calculate a predefined mpf_t value from a double value. More...
 
class  EConstantEvaluation
 This constant evaluation calculates the value E. More...
 
class  ExpOperation
 This operation calculates the exponential function of the supplied value. More...
 
class  Function
 This class is an abstract class. It supplies the interface for objective functions. More...
 
class  FunctionEvaluationReduceOperation
 This vector reduce operation reduces a vector by evaluation of the given function. More...
 
class  FunctionReduceOperator
 This class is a function, which reduces a specific function to a function with a vector reduce operation. More...
 
class  GeometricAverageReduceOperation
 This vector reduce operation reduces a vector by calculation of its geometric average. More...
 
class  GlobalAttractorEvaluation
 This class implements a specific statistical evaluation, which supplies the global attractor positions of the particles. More...
 
class  GlobalAttractorUpdatesStatistic
 This class implements a statistic, which evaluates how often each particle updates a global attractor. More...
 
class  GlobalBest
 This class implements the global best topology for the particle swarm, where all particles are neighbors. More...
 
class  GlobalBestPositionDistTo1DOptimumStatistic
 This class implements a statistic, which evaluates the distance of the global best found position to the nearest local optimum if only a single dimension is variable. More...
 
class  GlobalBestPositionFunctionEvaluationStatistic
 This class implements a statistic, which evaluates the objective function at the global best position found so far. More...
 
class  GlobalBestPositionStatistic
 This class implements a statistic, which displays the position entries of the overall best position found so far. More...
 
class  GridNeighborhood
 This class implements the grid or von Neumann topology for the particle swarm. More...
 
class  IdentitySpecificFunction
 This class implements a specific function with an evaluation function that clones the input. More...
 
class  InclinedPlane
 This class implements the inclined plane function, which represents a function with constant first derivative. More...
 
class  InclinedPlaneAsym
 This class implements the asymmetric inclined plane function, which represents a function with constant first derivative, but different constant entries for each dimension. More...
 
class  IncreasingOrderNthObjectReduceOperation
 This vector reduce operation reduces a vector by sorting the vector and returning the value at the respective position of the sorted vector. More...
 
class  LBestNeighborhood
 This class implements the lbest neighborhood topology for the particle swarm. More...
 
class  LocalAttractorEvaluation
 This class implements a specific statistical evaluation, which supplies the local attractor positions of the particles. More...
 
class  LocalAttractorUpdatesStatistic
 This class implements a statistic, which evaluates how often each particle updates its local attractor. More...
 
class  Log2DoubleOperation
 This operation calculates logarithm with base two of the supplied value. More...
 
class  Log2Operation
 This operation calculates the logarithm with base two of the supplied value. More...
 
class  LogEOperation
 This operation calculates the logarithm with base E of the supplied value. More...
 
class  MaximalValueReduceOperation
 This vector reduce operation reduces a vector by calculation of its maximal entry. More...
 
class  MaxOperation
 This pair combination operation reduces two values by calculation of the maximum. More...
 
class  MinimalValueReduceOperation
 This vector reduce operation reduces a vector by calculation of its minimal entry. More...
 
class  MinOperation
 This pair combination operation reduces two values by calculation of the minimum. More...
 
class  MinusInfinityConstantEvaluation
 This constant evaluation calculates the value -infinity. More...
 
class  MonoSphere
 This class represents a function, which performs like the sphere function in the first dimension and is constant in all other dimensions. More...
 
class  MovedRosenbrock
 This class represents a moved version of the well known test function rosenbrock, where the optimal value is moved to the origin. More...
 
class  MultiplyOperation
 This pair combination operation reduces two values by multiplication. More...
 
class  NamedStatistic
 This class implements a statistic, where the name is set manually. More...
 
class  Neighborhood
 This class is an abstract class. It supplies the interface for neighborhood topologies of the particle swarm. More...
 
class  Norm1
 This class represents a function which calculates the Manhattan norm of a vector. More...
 
class  Norm1Plus2PowerMinusK
 This class represents a function, which calculates the p-norm for all p=1+1/2exponent. More...
 
class  Norm2
 This class represents a function, which calculates the 2-norm. More...
 
class  Norm2PowerK
 This class represents a function which calculates the p-norm for all p which are powers of 2. More...
 
class  Norm4
 This class represents a function, which calculates the 4-norm. More...
 
class  Norm8
 This class represents a function, which calculates the 8-norm. More...
 
class  NormInfinity
 This class represents a function which calculates the infinity norm of a vector. More...
 
class  ObjectiveFunctionEvaluationReduceOperation
 This vector reduce operation reduces a vector by evaluation of the specified objective function. More...
 
class  OperatedFunction
 This class is a function, which applies some operation to the result of another function. More...
 
class  OperatedSpecificFunction
 This class implements a specific function, which combines an operation with a specific function. More...
 
class  OperatedSpecificStatisticalEvaluation
 This class implements a specific statistical evaluation, which operates on the values of another specific statistical evaluation. More...
 
class  OperatedStatistic
 This class implements a statistic, which operates on the values of another statistic. More...
 
class  Operation
 This class is an abstract class. It supplies the interface to operate on single mpf_t values. More...
 
class  OrientationChangeUpdater
 The orientation change updater implements an update procedure, which changes orientation if some directions have little relative movement. More...
 
class  PairReduceOperation
 This class is an abstract class. It supplies the interface for reducing two mpf_t values to a single value. More...
 
class  Particle
 The particles for the particle swarm optimization algorithm. More...
 
class  PiConstantEvaluation
 This constant evaluation calculates the value Pi. More...
 
class  PlusInfinityConstantEvaluation
 This constant evaluation calculates the value +infinity. More...
 
class  PositionAndVelocityUpdater
 This class is an abstract class for processing the velocity and position update of each particle. More...
 
class  PositionEvaluation
 This class implements a specific statistical evaluation, which supplies the positions of the particles. More...
 
class  PotentialAbsVelocityPlusDistToGlobalAttractor
 This potential calculator can calculate the scaled absolute value of the velocity plus the distance to the global attractor. More...
 
class  PotentialCalculator
 This class is an abstract class. It supplies the interface for calculation of some statistical data. More...
 
class  PotentialFunctionDifference
 This potential calculator can calculate the function difference statistic. More...
 
class  PotentialSqrtAbsVelocityPlusSqrtDistToGlobalAttractor
 This potential calculator can calculate the scaled square root of the absolute velocity plus the square root of the distance to the global attractor. More...
 
class  PowOperation
 This operation calculates the power of the supplied value to a given exponent. More...
 
class  PrecisionStatistic
 This class implements a statistic, which evaluates how the precision of the evaluations evolve. More...
 
class  ProductReduceOperation
 This vector reduce operation reduces a vector by calculation of its product. More...
 
class  ProgramVersion
 This class stores a program version. More...
 
class  RandomPositiveDefiniteSecondDerivative
 This class represents a function with constant random positive (semi) definite derivative. More...
 
class  Rastrigin
 This class represents the well known test function rastrigin. More...
 
class  RingNeighborhood
 This class implements the ring neighborhood topology for the particle swarm. More...
 
class  Rosenbrock
 This class represents the well known test function rosenbrock. More...
 
class  ScaledHadamardRotatedSphere
 This class represents a scaled and rotated version of the well known sphere function. More...
 
class  ScaledHadamardRotatedSphereFixed
 This class represents a scaled and rotated version of the well known sphere function with fixed scale 106. More...
 
class  ScaledSphere
 This class represents a scaled version of the well known sphere function. More...
 
class  ScaledSphereFixed
 This class represents a scaled version of the well known sphere function with fixed scale 106. More...
 
class  ScaledSphereRand
 This class represents a randomly scaled version of the well known sphere function. More...
 
class  Schwefel1
 This class represents the well known test function schwefel. More...
 
class  Schwefel2
 This class represents the well known test function schwefel. More...
 
class  SearchSpaceBound
 This class can store information about where the bounds of the objective function are. More...
 
class  SingleDifferentDirection
 This class implements a function with a special direction. More...
 
class  SinOperation
 This operation calculates the sine function of the supplied value. More...
 
class  SortingFunction
 This class implements a function, which measures the sortedness of the position entries. More...
 
class  SpecificFunction
 This class is an abstract class. It supplies an interface for operations on vectors. More...
 
class  SpecificIdReduceOperation
 This vector reduce operation reduces a vector by ignoring all values of the vector except the specified one. More...
 
class  SpecificStatisticalEvaluation
 This class is an abstract class. It supplies the interface for intermediate statistical evaluations. More...
 
class  Sphere
 This class represents a function which calculates the 2-norm (which is equivalent to the sphere function). More...
 
class  SpherePlus
 This class represents the well known test function sphere plus. More...
 
class  SqrtOperation
 This operation calculates the square root of the supplied value. More...
 
class  Statistic
 This class is an abstract class. It supplies the interface for statistical evaluations. More...
 
class  StatisticReduceOperation
 This class is an abstract class. It supplies the interface to reduce specific statistical evaluations to analyzable statistics. More...
 
class  StatisticReduceOperator
 This class implements a statistic, which reduces a specific statistical evaluation to an analyzable statistic. More...
 
class  Statistics
 This class stores current information about the particle swarm. More...
 
class  SubtractOperation
 This pair combination operation reduces two values by subtraction. More...
 
class  SumReduceOperation
 This vector reduce operation reduces a vector by calculation of its sum. More...
 
class  TanOperation
 This operation calculates the tangent function of the supplied value. More...
 
class  TestingFunction
 This class is generated for testing purpose. More...
 
class  TestingUpdater
 The testing updater implements an experimental position and velocity update procedure. More...
 
class  TwoCupsFunction
 This class represents a test function with 2D many optimal positions. More...
 
class  VectorOperation
 This class is an abstract class. It supplies the interface to operate on vectors of mpf_t values. More...
 
class  VectorReduceOperation
 This an abstract class. It supplies the interface for reducing a vector of mpf_t values to a single value. More...
 
class  VelocityAdjustment
 This class is an abstract class for processing the velocity adjustment after the position update of each particle. More...
 
class  VelocityAdjustmentAdjust
 This class implements the adjust velocity adjustment strategy. More...
 
class  VelocityAdjustmentDeterministicBack
 This class implements the deterministic back velocity adjustment strategy. More...
 
class  VelocityAdjustmentNone
 This class implements the none velocity adjustment strategy. More...
 
class  VelocityAdjustmentRandomBack
 This class implements the random back velocity adjustment strategy. More...
 
class  VelocityAdjustmentZero
 This class implements the zero velocity adjustment strategy. More...
 
class  VelocityEvaluation
 This class implements a specific statistical evaluation, which supplies the velocities of the particles. More...
 
class  WheelNeighborhood
 This class implements the wheel topology for the particle swarm. More...
 

Enumerations

enum  AbsorptionMarkDimensions { ABSORPTION_MARK_DIMENSIONS_ALL_ON_CHANGE, ABSORPTION_MARK_DIMENSIONS_OUTSIDE_BOUNDS, ABSORPTION_MARK_DIMENSIONS_ON_BOUNDARY }
 This enumeration describes, which dimensions are marked as modified, if absorption bound handling is active. This determines, for which dimensions the velocity adjustment is used. More...
 
enum  RandomForthMarkDimensions { RANDOM_FORTH_MARK_DIMENSIONS_ALL_ON_CHANGE, RANDOM_FORTH_MARK_DIMENSIONS_OUTSIDE_BOUNDS, RANDOM_FORTH_MARK_DIMENSIONS_ON_BOUNDARY }
 This enumeration describes, which dimensions are marked as modified, if random forth bound handling is active. This determines, for which dimensions the velocity adjustment is used. More...
 
enum  SingleDifferentDirectionMode { SINGLE_DIFFERENT_DIRECTION_MODE_FIRST, SINGLE_DIFFERENT_DIRECTION_MODE_DIAGONAL, SINGLE_DIFFERENT_DIRECTION_MODE_RANDOM }
 This enumeration determines the specific behavior of the single different direction function. More...
 

Functions

void __AssertCondition (const char *argument, const char *file, const char *function_name, int line, std::string message)
 Prints the given information to stderr and let the program terminate with exit code 1. More...
 
bool AllowedToRun ()
 If run check is activated then This method checks whether the program is currently allowed to run. More...
 
StatisticsDoPso (Statistics *statistics)
 This method proceeds the activities of the PSO algorithm. More...
 
StatisticsInitAndDoPso ()
 This method initializes the particles and starts the swarm. More...
 
bool operator< (const ProgramVersion &a, const ProgramVersion &b)
 Comparison operator "less" between program versions. More...
 
bool operator<= (const ProgramVersion &a, const ProgramVersion &b)
 Comparison operator "less or equal" between program versions. More...
 
bool operator== (const ProgramVersion &a, const ProgramVersion &b)
 Comparison operator "equal" between program versions. More...
 
bool operator> (const ProgramVersion &a, const ProgramVersion &b)
 Comparison operator "greater" between program versions. More...
 
bool operator>= (const ProgramVersion &a, const ProgramVersion &b)
 Comparison operator "greater or equal" between program versions. More...
 
StatisticsRestoreAndDoPso ()
 Loads information from the backup file and restarts the particle swarm. More...
 
void Shutdown ()
 Stores all data and generates a shutdown file to ease restarting of this particle swarm execution. More...
 
int StartTasks (char *argv[])
 Restarts all particle swarms which are correctly terminated in the folder specified in argument 2 of the supplied char * array. More...
 
void WriteCurrentState (std::string filename)
 Writes a backup file with the specified file name and stores there all needed data to restart the particle swarm. More...
 

Variables

const ProgramVersion PSO_PROGRAM_VERSION
 Describes the current version of this PSO program. More...
 

Detailed Description

base namespace for this project.

Enumeration Type Documentation

This enumeration describes, which dimensions are marked as modified, if absorption bound handling is active. This determines, for which dimensions the velocity adjustment is used.

Enumerator
ABSORPTION_MARK_DIMENSIONS_ALL_ON_CHANGE 

If the position of at least one dimension is situated outside of the search space bounds, the velocity adjustment is applied on all dimensions.

ABSORPTION_MARK_DIMENSIONS_OUTSIDE_BOUNDS 

The velocity adjustment is applied only in dimensions, where the position is situated outside of the search space bounds.

ABSORPTION_MARK_DIMENSIONS_ON_BOUNDARY 

The velocity adjustment is applied only in dimensions, where the new position is situated exactly on the search space bounds.

This enumeration describes, which dimensions are marked as modified, if random forth bound handling is active. This determines, for which dimensions the velocity adjustment is used.

Enumerator
RANDOM_FORTH_MARK_DIMENSIONS_ALL_ON_CHANGE 

If the position of at least one dimension is situated outside of the search space bounds, the velocity adjustment is applied on all dimensions.

RANDOM_FORTH_MARK_DIMENSIONS_OUTSIDE_BOUNDS 

The velocity adjustment is applied only in dimensions, where the position is situated outside of the search space bounds.

RANDOM_FORTH_MARK_DIMENSIONS_ON_BOUNDARY 

The velocity adjustment is applied only in dimensions, where the new position is situated exactly on the search space bounds. (The event that the new position is situated exactly on the search space bounds is very unlikely).

This enumeration determines the specific behavior of the single different direction function.

Enumerator
SINGLE_DIFFERENT_DIRECTION_MODE_FIRST 

In this mode the special direction is the direction of the coordinate axis belonging to the first dimension. The special direction vector is then (1,0,...,0)

SINGLE_DIFFERENT_DIRECTION_MODE_DIAGONAL 

In this mode the special direction is diagonal according to all dimensions. All entries of the direction vector are 1. The special direction vector is then (1,1,...,1)

SINGLE_DIFFERENT_DIRECTION_MODE_RANDOM 

In this mode the special direction is randomly chosen according to the random number generator for this function. The special direction vector is then (r0,r1,...,rD-1), where each ri is randomly distributed similar to a gaussian distribution with expectation 0 and variance 1.

Function Documentation

void highprecisionpso::__AssertCondition ( const char *  argument,
const char *  file,
const char *  function_name,
int  line,
std::string  message 
)

Prints the given information to stderr and let the program terminate with exit code 1.

Parameters
argumentThe argument of the checked condition.
fileThe file where the error occurs.
function_nameThe function name where the error occurs.
lineThe line where the error occurs
messageA further information message, which gives some additional information why the error occurs.
bool highprecisionpso::AllowedToRun ( )

If run check is activated then This method checks whether the program is currently allowed to run.

Returns
The truth value whether the program is allowed to run.
Statistics* highprecisionpso::DoPso ( Statistics statistics)

This method proceeds the activities of the PSO algorithm.

Here the PSO iterations are controlled. At each iteration the update of each position of the particles is started. The actual update of the global attractor is initialized here. Statistical evaluations, the swarm debugging, backups and the check whether the program is allowed to run are started here.

Parameters
statisticsThe statistics where data about the current PSO execution are stored.
Returns
The final statistic.
Statistics* highprecisionpso::InitAndDoPso ( )

This method initializes the particles and starts the swarm.

Returns
The final statistic.
bool highprecisionpso::operator< ( const ProgramVersion a,
const ProgramVersion b 
)

Comparison operator "less" between program versions.

Parameters
aThe first program version which should be compared.
bThe second program version which should be compared.
Returns
The result of the comparison.

Most important is version, second important is version_minor and least important is version_patch_level.

bool highprecisionpso::operator<= ( const ProgramVersion a,
const ProgramVersion b 
)

Comparison operator "less or equal" between program versions.

Parameters
aThe first program version which should be compared.
bThe second program version which should be compared.
Returns
The result of the comparison.

Most important is version, second important is version_minor and least important is version_patch_level.

bool highprecisionpso::operator== ( const ProgramVersion a,
const ProgramVersion b 
)

Comparison operator "equal" between program versions.

Parameters
aThe first program version which should be compared.
bThe second program version which should be compared.
Returns
The result of the comparison.

Most important is version, second important is version_minor and least important is version_patch_level.

bool highprecisionpso::operator> ( const ProgramVersion a,
const ProgramVersion b 
)

Comparison operator "greater" between program versions.

Parameters
aThe first program version which should be compared.
bThe second program version which should be compared.
Returns
The result of the comparison.

Most important is version, second important is version_minor and least important is version_patch_level.

bool highprecisionpso::operator>= ( const ProgramVersion a,
const ProgramVersion b 
)

Comparison operator "greater or equal" between program versions.

Parameters
aThe first program version which should be compared.
bThe second program version which should be compared.
Returns
The result of the comparison.

Most important is version, second important is version_minor and least important is version_patch_level.

Statistics* highprecisionpso::RestoreAndDoPso ( )

Loads information from the backup file and restarts the particle swarm.

Returns
The final statistic.
void highprecisionpso::Shutdown ( )

Stores all data and generates a shutdown file to ease restarting of this particle swarm execution.

int highprecisionpso::StartTasks ( char *  argv[])

Restarts all particle swarms which are correctly terminated in the folder specified in argument 2 of the supplied char * array.

Parameters
argv[]The arguments of the initial call of this program.
Returns
0 if execution was successful and something different otherwise.
void highprecisionpso::WriteCurrentState ( std::string  filename)

Writes a backup file with the specified file name and stores there all needed data to restart the particle swarm.

Parameters
filenameThe file name of the backup file.

Variable Documentation

const ProgramVersion highprecisionpso::PSO_PROGRAM_VERSION

Describes the current version of this PSO program.