PaGMO  1.1.5
Public Member Functions
pagmo::util::racing::race_algo Class Reference

Racing mechanism for algorithms. More...

#include <race_algo.h>

Public Member Functions

 race_algo (const std::vector< algorithm::base_ptr > &algos=std::vector< algorithm::base_ptr >(), const problem::base &prob=problem::ackley(), unsigned int pop_size=100, unsigned int seed=0)
 Constructor of the racing mechanism for algorithms. More...
 
 race_algo (const std::vector< algorithm::base_ptr > &algos, const std::vector< problem::base_ptr > &prob, unsigned int pop_size=100, unsigned int seed=0)
 Constructor of the racing mechanism for algorithms. More...
 
std::pair< std::vector< unsigned int >, unsigned int > run (const unsigned int n_final, const unsigned int min_trials, const unsigned int max_count, double delta, const std::vector< unsigned int > &, const bool race_best, const bool screen_output)
 Juice of racing mechanisms for algorithms. More...
 

Detailed Description

Racing mechanism for algorithms.

This class allows the racing of a set of algorithms on a problem or a set of problems. It supports the racing over single objective box-constrained and equality / inequality constrained problems.

Definition at line 46 of file race_algo.h.

Constructor & Destructor Documentation

pagmo::util::racing::race_algo::race_algo ( const std::vector< algorithm::base_ptr > &  algos = std::vector<algorithm::base_ptr>(),
const problem::base prob = problem::ackley(),
unsigned int  pop_size = 100,
unsigned int  seed = 0 
)

Constructor of the racing mechanism for algorithms.

Construct for a single problem

Parameters
[in]algosThe set of algorithms to be raced
[in]probThe problem to be considered
[in]pop_sizeThe size of the population that the algorithms will be evolving
[in]seedSeed to be used in racing mechanisms

Definition at line 269 of file race_algo.cpp.

pagmo::util::racing::race_algo::race_algo ( const std::vector< algorithm::base_ptr > &  algos,
const std::vector< problem::base_ptr > &  probs,
unsigned int  pop_size = 100,
unsigned int  seed = 0 
)

Constructor of the racing mechanism for algorithms.

Construct for a set of problems

Parameters
[in]algosThe set of algorithms to be raced
[in]probsThe set of problems to be considered
[in]pop_sizeThe size of the population that the algorithms will be evolving
[in]seedSeed to be used in racing mechanisms

Definition at line 286 of file race_algo.cpp.

Member Function Documentation

std::pair< std::vector< unsigned int >, unsigned int > pagmo::util::racing::race_algo::run ( const unsigned int  n_final,
const unsigned int  min_trials,
const unsigned int  max_count,
double  delta,
const std::vector< unsigned int > &  active_set,
const bool  race_best,
const bool  screen_output 
)

Juice of racing mechanisms for algorithms.

The interface of race_algo mirrors race_pop.

Parameters
[in]n_finalDesired number of winners.
[in]min_trialsMinimum number of trials to be executed before dropping algorithms.
[in]max_countMaximum number of objective function evaluation before the race ends.
[in]deltaConfidence level for statistical testing.
[in]active_setIndices of individuals that should participate in the race. If empty, race on the whole algorithm set.
[in]race_bestWhetn true extracts the best, otherwise the worst algorithm.
[in]screen_outputWhether to log racing status on the console output.
See also
Refer to util::racing::race_pop for the details of the racing mechanisms.

NOTE: The race of algorithms is in essence very similar to the race of individuals. A direct re-implementation of the racing routines for algorithms will cause unnecessary code duplication. To avoid that, internally, here the task of race_algo is reformulated into its ``dual form" in pop_race. The results of race_algo is then reconstructed from the results of pop_race. If Hoeffding race or Bernstein race is desired, they can be implemented in racing.cpp and be invoked in race_pop.cpp. This way, all the existing / to-be-implemented racing mechanisms can be shared by both race_pop and race_algo.

Definition at line 310 of file race_algo.cpp.


The documentation for this class was generated from the following files: