Particle Swarm Optimization (PSO) is a nature-inspired meta-heuristic adaptable to continuous optimization problems. To avoid numerical instabilities or artifacts it is necessary to evaluate floating point calculations with high precision. Our High Precision Particle Swarm Optimization (HiPPSO) software realizes this demand. Additionally our software provides an automatic procedure to adjust precision if it is necessary for accurate evaluations. This enables a fast execution time because the software always evaluates the calculations with suitable precision and does not use too much precision if it is not necessary. HiPPSO is implemented in C++ and has a very flexible class hierarchy to replace subroutines on purpose or extend functionality by simply implementing abstract classes. The software is available on a GitHub repository at

In real world situations we are often facing hard optimization problems. A successful research field covering these problems is the application of meta-heuristics, which are highly flexible and can optimize functions without deep knowledge of the objective function (Black Box optimization). Particle Swarm Optimization (PSO) introduced by Kennedy and Eberhart [^{D}^{D}_{p}_{p}_{p}

In this movement equations _{l}_{g}_{l}_{g}

The HiPPSO was implemented to establish a highly flexible PSO library, which enables the researcher to analyze the behavior of the PSO with a new level of quality investing only a small effort. The implementation of HiPPSO already supplies a wide variety of features and extensions known for standard PSO algorithms and, furthermore, some introductory examples are supplied. Therefore even for people who are no researchers it would be very interesting to use HiPPSO, e.g., they can use it for optimizing their own functions. For a more detailed overview on how the HiPPSO can be used see the Section “Reuse potential”.

There are already results on convergence analysis for the PSO, but mostly they are either performed on slightly modified versions of the classical PSO or on very reduced problem instances. For an exemplary discussion on a modified version of the classical PSO see [

To get a detailed impression on the differences between calculations with limited/fixed precision and self-adjusting precision we present examples of the PSO algorithm optimizing the well-known benchmark function _{l}_{g}^{D}

In Figure

Development of the global attractor value of the PSO algorithm with constant/fixed precision (64 bits for mantissa) and adjusting precision while optimizing the four dimensional

In Figure

Development of the global attractor value of the PSO algorithm with constant/fixed precision (64 bits for mantissa) and adjusting precision while optimizing the four dimensional

_{p}_{,}_{d}_{p}_{d}_{p}, e_{d} is the d th Cartesian unit vector and_{0≤}_{i}_{<}_{D} ψ(i) relative potential

The relative potential captures the importance of each dimension and in [

In Figure

Development of the relative potential Ψ of the PSO algorithm with constant/fixed precision (64 bits for mantissa) and adjusting precision while optimizing the four dimensional

With self-adjusting precision we can observe the relative potential for more iterations as visualized in Figure ^{0}, which signals high importance, and the first two dimensions are continuously decreasing to zero, which signals low importance. Therefore it is obvious that the PSO actually optimizes only the last two dimensions. In [

All the data has been produced by HiPPSO as it is possible to use fixed as well as self-adjusting precision for evaluation. The authors of [

The architecture is built to supply a highly flexible basis with easily exchangeable parts. Before starting the HiPPSO program, one has to generate a configuration file specifying all parameters, the objective function, the update strategies, bound handling strategies, evaluated statistics and much more. To simplify the usage some example configuration files are supplied. Also an online tool for configuration file generation can be used to describe the intended configuration. A link to that tool can be found in the main homepage for the HiPPSO on GitHub. The whole PSO algorithm is also extremely modularized, which enables researchers to just exchange a single module in their implementation and still use all remaining parts from the HiPPSO framework. In most cases writing source code is not necessary as most standard variants are already implemented and can be picked by the configuration file.

The main structure of the HiPPSO supplies all active modules (classes) and configured properties for the PSO by static variables within the configuration namespace (contained in the base namespace highprecisionpso). The most important statically available elements in the namespace configuration are

+

the pointer to the objective function

+

the pointer to the current statistics – the statistics include pointers to particles

+

the number of dimensions of the search space

+

the number of particles

+

the parameter

+

the parameter _{l}

+

the parameter _{g}

+

the pointer to the position and velocity update procedure

+

the pointer to the bound handling procedure

+

the pointer to the velocity adjustment strategy

+

the pointer to the neighborhood topology.

As visualized in Figures

Class diagram of

Class diagram of

The main PSO loop is executed in the

In the following we describe the intended workflow for updating the particles which clarifies the intended interaction between the selected modules.

The update procedure can be separated into three subroutines. For each particle

to calculate the new velocity and to call

to call

It is intended that the subroutine

to calculate the new position,

to call

to call

The subroutine

The chosen neighborhood

The bound handling strategy might also change the distance to some position because the search space may wrap around. Therefore we also supplied the function

All specified statistics will update after all positions and attractors are updated. During calculation of statistics the evaluation has access to all data including but not limited to particle position and velocity and current state of classes guiding the update process.

The test suite of this implementation can be executed by

The tests cover verification of functionality as well as the guarantee to generate reproducible results. This is achieved by three types of tests.

We are comparing results of evaluations with the

– We especially checked trigonometric functions (

– exponential functions (

– and all implemented benchmark functions (

We are checking that the precision of evaluated functions is closely related to the currently active precision. For this purpose we evaluate functions with different precisions and check that the result produced with lower precision is equal to the result with higher precision if it is truncated to the lower precision.

Finally we are checking that the current executable produces absolutely identical results compared to a reference evaluation of this software. Here any available module or configuration option (objective function, bound handling strategy, neighborhood topology, …) is tested at least once.

These criteria enable researchers to use this software for scientific works as it is guaranteed that anyone can use this software to independently confirm results of others if the configuration of the software is published.

HiPPSO has been tested successfully on Ubuntu 16.04 (also by

C++ with gcc version ≥ 5.5.

There are no additional system requirements exceeding the limits of a basic desktop PC.

When running HiPPSO from source code, the GNU Multiple Precision Arithmetic Library (GMP library) version ≥ 6 is needed.

On Windows operating system we suggest using Cygwin with components

The GMP library has to be installed additionally from the homepage of the project (

On Ubuntu one can simply install all components by sudo

After preparation one can install HiPPSO by the command

Authored and maintained by Alexander Raß with minor contributions from Manuel Schmitt.

DOI:

English

This Software can be reused by scientists in multiple ways. It can be used for optimization/minimization of an objective function specified by the user without knowledge of the PSO algorithm itself, for quality measurements of the PSO algorithm to extend the understanding of the mechanisms of the PSO and for integration and testing of new modules of the PSO.

Other researchers looking for a tool to optimize/minimize some function in the continuous domain can use this tool for optimization. It is only necessary to describe the function and the software can immediately start to optimize and present optimized solutions to the user. A wide range of objective functions are already implemented (

Also any quality measurement which is needed for analysis of the PSO algorithm can be produced by this software. The statistics which should be extracted by the PSO can be specified similarly to the objective function by a grammar (see also the online tool for configuration file generation). Examples of predefined options are positions, velocities, attractor positions, function values of those and many functions dependent on those characteristics. It can also be specified at which iterations the statistics should be produced. All evaluations can be made with arbitrary, self-adjusting precision and are therefore highly reliable and can be displayed for very large number of iterations.

A future work using HiPPSO is measuring precisely what the speed of convergence is, i.e., it answers the question how long it takes to improve the result of an objective function by some specified value of

Last but not least researchers developing PSO modules can use this software. They can use the complete base structure of the PSO and just replace some part of the PSO algorithm by their version. Explicit options for replacement are for example bound handling strategies, neighborhood topologies, calculation of new position and many more. Links to some guidelines how your new modules can be implemented and activated can be found on the main GitHub page of HiPPSO in the section “Extensibility”.

If there appear any issues or complications while using HiPPSO one can use either GitHub issues or send a mail to Alexander Raß (

The author has no competing interests to declare.