25 #ifndef PAGMO_ALGORITHM_PSO_GENERATIONAL_H
26 #define PAGMO_ALGORITHM_PSO_GENERATIONAL_H
28 #include "../config.h"
29 #include "../serialization.h"
33 namespace pagmo {
namespace algorithm {
55 pso_generational(
int gen=1,
double omega = 0.7298,
double eta1 = 2.05,
double eta2 = 2.05,
double vcoeff = 0.5,
int variant = 5,
int neighb_type = 2,
int neighb_param = 4 );
58 std::string get_name()
const;
60 std::string human_readable_extra()
const;
64 void initialize_topology__lbest( std::vector< std::vector<int> > &neighb )
const;
65 void initialize_topology__von( std::vector< std::vector<int> > &neighb )
const;
66 void initialize_topology__adaptive_random( std::vector< std::vector<int> > &neighb )
const;
68 friend class boost::serialization::access;
69 template <
class Archive>
70 void serialize(Archive &ar,
const unsigned int)
72 ar & boost::serialization::base_object<base>(*this);
73 ar &
const_cast<int &
>(m_gen);
74 ar &
const_cast<double &
>(m_omega);
75 ar &
const_cast<double &
>(m_eta1);
76 ar &
const_cast<double &
>(m_eta2);
77 ar &
const_cast<double &
>(m_vcoeff);
78 ar &
const_cast<int &
>(m_variant);
79 ar &
const_cast<int &
>(m_neighb_type);
80 ar &
const_cast<int &
>(m_neighb_param);
91 const double m_vcoeff;
95 const int m_neighb_type;
97 const int m_neighb_param;
104 #endif // PAGMO_ALGORITHM_PSO_GENERATIONAL_H
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base algorithm.
std::vector< double > decision_vector
Decision vector type.
Particle Swarm optimization generational.
std::vector< double > fitness_vector
Fitness vector type.
container_type::size_type size_type
Population size type.