25 #ifndef PAGMO_ALGORITHM_PSO_GENERATIONAL_RACING_H
26 #define PAGMO_ALGORITHM_PSO_GENERATIONAL_RACING_H
28 #include "../config.h"
29 #include "../serialization.h"
31 #include "../util/race_pop.h"
34 namespace pagmo {
namespace algorithm {
46 pso_generational_racing(
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,
unsigned int nr_eval_per_x = 5,
unsigned int max_fevals = std::numeric_limits<unsigned int>::max());
49 std::string get_name()
const;
51 std::string human_readable_extra()
const;
55 void initialize_topology__lbest( std::vector< std::vector<int> > &neighb )
const;
56 void initialize_topology__von( std::vector< std::vector<int> > &neighb )
const;
57 void initialize_topology__adaptive_random( std::vector< std::vector<int> > &neighb )
const;
66 void racing__construct_race_environment(
util::racing::race_pop & race_structure,
const problem::base& prob,
const std::vector<decision_vector> &x_list1,
const std::vector<decision_vector> &x_list2 )
const;
67 std::pair<population::size_type, unsigned int> racing__race_for_winner(
util::racing::race_pop &race_structure,
int idx1,
int idx2,
unsigned int max_fevals)
const;
70 friend class boost::serialization::access;
71 template <
class Archive>
72 void serialize(Archive &ar,
const unsigned int)
74 ar & boost::serialization::base_object<base>(*this);
75 ar &
const_cast<int &
>(m_gen);
76 ar &
const_cast<double &
>(m_omega);
77 ar &
const_cast<double &
>(m_eta1);
78 ar &
const_cast<double &
>(m_eta2);
79 ar &
const_cast<double &
>(m_vcoeff);
80 ar &
const_cast<int &
>(m_variant);
81 ar &
const_cast<int &
>(m_neighb_type);
82 ar &
const_cast<int &
>(m_neighb_param);
84 ar &
const_cast<unsigned int&
>(m_max_fevals);
95 const double m_vcoeff;
99 const int m_neighb_type;
101 const int m_neighb_param;
104 const unsigned int m_nr_eval_per_x;
106 mutable unsigned int m_fevals;
108 const unsigned int m_max_fevals;
115 #endif // PAGMO_ALGORITHM_PSO_GENERATIONAL_RACING_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 with racing.
std::vector< double > fitness_vector
Fitness vector type.
container_type::size_type size_type
Population size type.
Racing mechanism for a population.