25 #ifndef PAGMO_ALGORITHM_PSO_H
26 #define PAGMO_ALGORITHM_PSO_H
28 #include "../config.h"
29 #include "../serialization.h"
33 namespace pagmo {
namespace algorithm {
78 pso(
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 );
83 void initialize_topology__lbest( std::vector< std::vector<int> > &neighb )
const;
84 void initialize_topology__von( std::vector< std::vector<int> > &neighb )
const;
85 void initialize_topology__adaptive_random( std::vector< std::vector<int> > &neighb )
const;
86 std::string get_name()
const;
88 std::string human_readable_extra()
const;
90 friend class boost::serialization::access;
91 template <
class Archive>
92 void serialize(Archive &ar,
const unsigned int)
94 ar & boost::serialization::base_object<base>(*this);
95 ar &
const_cast<int &
>(m_gen);
96 ar &
const_cast<double &
>(m_omega);
97 ar &
const_cast<double &
>(m_eta1);
98 ar &
const_cast<double &
>(m_eta2);
99 ar &
const_cast<double &
>(m_vcoeff);
100 ar &
const_cast<int &
>(m_variant);
101 ar &
const_cast<int &
>(m_neighb_type);
102 ar &
const_cast<int &
>(m_neighb_param);
107 const double m_omega;
113 const double m_vcoeff;
117 const int m_neighb_type;
119 const int m_neighb_param;
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base algorithm.
std::vector< double > decision_vector
Decision vector type.
Particle Swarm optimization.
std::vector< double > fitness_vector
Fitness vector type.
container_type::size_type size_type
Population size type.