00001 00020 #ifndef _SOLIS_H 00021 00022 #define _SOLIS_H 1 00023 00024 #include <realea/common/ilocalsearch.h> 00025 00026 namespace realea { 00027 00028 00029 class SolisWets : public IParallelLocalSearch { 00030 public:SolisWets(void); 00031 void setDelta(double maxdelta); 00032 void setDelta(double mindelta, double maxdelta); 00033 protected: 00037 static const unsigned maxSuccess=5; 00038 00042 static const unsigned maxFailed=3; 00043 00044 private: 00045 unsigned apply(ILSParameters *opt, tChromosomeReal &sol, tFitness &fitness, unsigned itera); 00046 ILSParameters *getInitOptions(tChromosomeReal &sol); 00047 ILSParameters *recoverOptions(tGen *params, unsigned size); 00048 00058 void storeOptions(ILSParameters *params, tGen **paparams, unsigned *psize); 00059 00060 private: 00071 tFitness getNeighbour(ILSParameters *param, tChromosomeReal &sol, tChromosomeReal &dif, tChromosomeReal &newsol); 00072 00073 double m_maxdelta; 00074 double m_mindelta; 00075 }; 00076 00077 } 00078 #endif