Εργασία για την εξεταστική Σεπτεμβρίου.

Introduction

This is a set of c++ programs, originally written by I. G. Tsoulos, that provide some enhancements of the PSO global optimization methods.

Availability

To obtain the source code, please follow this link (Right click, Save as).

UNIX/Linux Installation

Unpack the gzipped tar ball file and run the make command:

cd download_path
gzip -d PSO-enhanced.tar.gz
tar xvf PSo-enhanced.tar
cd PSO

Edit the Makefile.inc file to meet your system specification, most probably you will need to edit the last line:

ROOTDIR = /home/astavrak/PSO/

Compile the program:

make

Running the examples

There many example functions in the example sub-directory. To run a specific example, you may type (from the root directory):

bin/make_pso -p  examples/bf1.cc
for the bf1.cc example, which is:
# include <math.h>

/*  Bohachevsky 1 Problem
 */

extern "C"
{

  int getdimension()
  {
    return 2;
  }

  void    getleftmargin(double *x)
  {
    x[0]=-50.0;
    x[1]=-50.0;
  }

  void    getrightmargin(double *x)
  {
    x[0]= 50.0;
    x[1]= 50.0;
  }

  double  funmin(double *x)
  {
    return   x[0]*x[0] + 2.0*x[1]*x[1] 
           - 0.3*cos(3.0*M_PI*x[0])
           - 0.4*cos(4.0*M_PI*x[1])+0.7;
  }

  void    granal(double *x,double *g)
  {
    g[0]=2.0*x[0] + 0.3*3.0*M_PI*sin(3.0*M_PI*x[0]);
    g[1]=4.0*x[1] + 0.4*4.0*M_PI*sin(4.0*M_PI*x[1]);
  }

}

The latest command will produce an executable named pso. Run it in order to get the results:

./pso

.................................................................................
ITERATION= 199  YBEST=       4.7494492e-09  VARIANCE=   0.03447 STOPAT=    0.3118
ITERATION= 200  YBEST=       4.7494492e-09  VARIANCE=    0.0343 STOPAT=    0.3118
ITERATION= 201  YBEST=       4.7494492e-09  VARIANCE=   0.03413 STOPAT=    0.3118
ITERATION= 100  FEVALS= 1376.68 GEVALS=   36.56 SUCCESS=100.00%
AVERAGE FUNCTION CALLS = 1376.68
AVERAGE GRADIENT CALLS = 36.56

Publication

There is a paper about enhancing PSO methods:
I.G. Tsoulos and A. Stavrakoudis (2010), Enhancing PSO methods for global optimization Applied Mathematics and Computation, 2010, 216:2988-3001

Authors

Ioannis G. Tsoulos (itsoulos _at gmail com)

Athanassios Stavrakoudis (astavrak _at cc uoi gr)

Last Modified

Friday, 25-May-2012