25 #ifndef PAGMO_UTIL_RACE_POP_H
26 #define PAGMO_UTIL_RACE_POP_H
32 #include "../config.h"
33 #include "../serialization.h"
34 #include "../problem/base.h"
37 namespace pagmo{
namespace util {
74 std::pair<std::vector<population::size_type>,
unsigned int> run(
76 const unsigned int min_trials,
77 const unsigned int max_count,
79 const std::vector<population::size_type> &,
80 termination_condition term_cond,
82 const bool screen_output
88 void inherit_memory(
const race_pop&);
89 std::vector<fitness_vector> get_mean_fitness(
const std::vector<population::size_type> &active_set = std::vector<population::size_type>())
const;
90 void set_seed(
unsigned int);
94 void _validate_active_set(
const std::vector<population::size_type>& active_set,
unsigned int pop_size)
const;
95 void _validate_problem_stochastic(
const problem::base& prob)
const;
97 void _validate_budget(
const unsigned int min_trials,
const unsigned int max_f_evals,
const std::vector<population::size_type>& in_race)
const;
99 unsigned int prepare_population_friedman(
const std::vector<population::size_type> &in_race,
unsigned int count_iter);
100 unsigned int prepare_population_wilcoxon(
const std::vector<population::size_type> &in_race,
unsigned int count_iter);
102 unsigned int compute_required_fevals(
const std::vector<population::size_type>& in_race,
unsigned int num_iter)
const;
112 std::vector<population::size_type> construct_output_list(
113 const std::vector<racer_type>& racers,
114 const std::vector<population::size_type>& decided,
115 const std::vector<population::size_type>& in_race,
116 const std::vector<population::size_type>& discarded,
118 const bool race_best);
122 void cache_delete_entry(
unsigned int);
123 bool cache_data_exist(
unsigned int,
unsigned int)
const;
124 const eval_data &cache_get_entry(
unsigned int,
unsigned int)
const;
125 void cache_register_signatures(
const population&);
126 void print_cache_stats(
const std::vector<population::size_type> &)
const;
129 void generate_seeds(
unsigned int);
130 unsigned int get_current_seed(
unsigned int);
131 unsigned int m_race_seed;
134 racing_population m_pop;
135 racing_population m_pop_wilcoxon;
136 bool m_pop_registered;
137 std::vector<unsigned int> m_seeds;
140 std::vector<std::vector<eval_data> > m_cache_data;
141 std::vector<eval_data> m_cache_averaged_data;
142 std::vector<decision_vector> m_cache_signatures;
This rng returns an unsigned integer in the [0,2**32-1] range.
Fixed number of function evaluations.
termination_condition
Method to stop the race.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.
container_type::size_type size_type
Population size type.
Racing mechanism for a population.