ECF 1.5
AlgArtificialBeeColony.h
1#ifndef Artificial_Bee_Colony_h
2#define Artificial_Bee_Colony_h
3
4
5#include "Algorithm.h"
6#include "floatingpoint/FloatingPoint.h"
7
8
18{
19protected:
20 // declare all available selection operators (not all get used)
21 SelRandomOpP selRandomOp;
22 SelBestOpP selBestOp;
23 SelWorstOpP selWorstOp;
24 SelFitnessProportionalOpP selFitOp;
25
26 uint limit_;
27 bool elitism_;
28 double ubound_;
29 double lbound_;
30 std::vector< double > probability_;
31 bool isTrialAdded_;
32
33 bool employedBeesPhase(StateP state, DemeP deme);
34 bool onlookerBeesPhase(StateP state, DemeP deme);
35 bool calculateProbabilities(StateP state, DemeP deme);
36 bool scoutBeesPhase(StateP state, DemeP deme);
37 bool createNewFoodSource(IndividualP food, StateP state, DemeP deme);
38
39public:
41 void registerParameters(StateP state);
42 bool initialize(StateP state);
43 bool advanceGeneration(StateP state, DemeP deme);
44
45
46};
47typedef boost::shared_ptr<ArtificialBeeColony> ArtificialBeeColonyP;
48
49#endif // Artificial_Bee_Colony_h
50
Algorithm base class.
Definition: Algorithm.h:20
Artificial Bee Colony algorithm (see e.g. http://www.scholarpedia.org/article/Artificial_bee_colony_a...
bool advanceGeneration(StateP state, DemeP deme)
Perform a single generation on a single deme.
bool initialize(StateP state)
Initialize the algorithm, read parameters from the system, do a sanity check.
void registerParameters(StateP state)
Register algorithm's parameters (if any).