Fix newline in Windows.
[PaGMO.git] / SolversThreads / SolversThreads.h
blobba653d76c90b36a71b0289c1d4788ba4de93cdcd
1 /*
2 * SolverThreads.h
3 * PaGMO
5 * Created by Dario Izzo on 9/21/08.
6 * Copyright 2008 __MyCompanyName__. All rights reserved.
8 */
11 #ifndef SOLVERSTHREADS_H
12 #define SOLVERSTHREADS_H
14 #include <boost/thread/condition_variable.hpp>
15 #include <boost/thread/mutex.hpp>
17 #include "GOproblem.h"
18 #include "population.h"
20 //Here we define the parameters needed to instanciate a thread. These contain
21 //datas that are algorithm specific, but also data that are needed for all aglorithms (LB,UB,objfun,mutex etc.)
23 struct threadParam{
24 //Thread unique ID
25 unsigned int threadID;
27 //Solvers Data
28 int NP;
29 int generations;
30 //DE
31 int strategy;
32 double F,CR;
33 //PSO
34 double omega,eta1,eta2,vcoeff;
35 int nswarms;
36 //GA
37 double M,CRsga;
38 int insert_best;
39 //SA-AN
40 double Ts,Tf;
41 //pointers giving access to global resources
42 GOProblem* problem;
44 bool *isActive;
45 boost::mutex *TPmutex;
46 boost::condition_variable *exit;
47 Population *Ptr_pop;
48 std::ofstream *Ptr_log;
49 uint32_t randomSeed;
52 //Here we define the protoypes for each type of thread we may want to open
53 void *DEthread(void *data);
54 void *PSOthread(void *data);
55 void *MPSOthread(void *data);
56 void *SGAthread(void *data);
57 void *ASAthread(void *data);
58 #endif