00001 #ifndef Artificial_Bee_Colony_h
00002 #define Artificial_Bee_Colony_h
00003
00004
00005 #include "Algorithm.h"
00006 #include "floatingpoint/FloatingPoint.h"
00007
00008
00017 class ArtificialBeeColony : public Algorithm
00018 {
00019 protected:
00020
00021 SelRandomOpP selRandomOp;
00022 SelBestOpP selBestOp;
00023 SelWorstOpP selWorstOp;
00024 SelFitnessProportionalOpP selFitOp;
00025
00026 uint limit_;
00027 bool elitism_;
00028 double ubound_;
00029 double lbound_;
00030 std::vector< double > probability_;
00031 bool isTrialAdded_;
00032
00033 bool employedBeesPhase(StateP state, DemeP deme);
00034 bool onlookerBeesPhase(StateP state, DemeP deme);
00035 bool calculateProbabilities(StateP state, DemeP deme);
00036 bool scoutBeesPhase(StateP state, DemeP deme);
00037 bool createNewFoodSource(IndividualP food, StateP state, DemeP deme);
00038
00039 public:
00040 ArtificialBeeColony();
00041 void registerParameters(StateP state);
00042 bool initialize(StateP state);
00043 bool advanceGeneration(StateP state, DemeP deme);
00044
00045
00046 };
00047 typedef boost::shared_ptr<ArtificialBeeColony> ArtificialBeeColonyP;
00048
00049 #endif // Artificial_Bee_Colony_h
00050