// \****************************************************** // Datei AartsScheduler.h // Autor: Peter Unruh // nach Aarts, "Parallel Implementations of the Statistical Cooling Algorithm" // \****************************************************** #ifndef SA_AartsScheduler_H #define SA_AartsScheduler_H //#include #include #include #include "constants.h" #include "SA_ClusteringScheduler.h" /** * This scheduler implements an adaptive cooling schedule * which was introduced by Aarts. */ class SA_AartsScheduler : public SA_ClusteringScheduler { private: /// This output object is used to generate the output of this scheduler SA_Output saaartsoutput; protected: /// @name parameters needed by Aarts cooling schedule //@{ /// fatcor used for calculating the subchainlength float subchainfactor; /// distance parameter float delta; /// stopparameter float epsilon; /// smoothing factor float omega; //@} /// @name internal parameters for subchainlength determination //@{ /// subchainlength in current cluster unsigned long L; /// subchainlength when every cluster consists of only one processor unsigned long L0; // Laenge der Kette bei Anz. der Cluster == 1 /// unsigned long n_smooth; // Anzahl der geschpeicherten Werte fuer Glaettung float SmoothedMean, // Fuer die Bestimmung der "Ableitung" der Mittelwert-Funktion LastSmoothedMean, // dto. LastT, // dto. MeanbyT0; //@} /// the best solution energy ever seen float GlobalBestE; // beste ueber alle Prozessoren bis jetzt gesehene Loesung public: SA_AartsScheduler(); ~SA_AartsScheduler(); SA_Output *GetSchedulerOutput(); virtual int Equilibrium(); virtual void UpdateTemperature(); virtual int Frozen(); // WarmingUp void WarmingUp(SA_Problem & P, SA_Solution &s, SA_Solution &b, MPI_Comm comm ); void SetClusterNumber(unsigned long n_clu, unsigned long clu_size); // die Anzahl der Cluster dem Scheduler mitteilen int ReadConfig(std::istream &); void ShowConfig(std::ostream & ); // Testausgabe der Konfiguration void SetLoopFactor(float f) {subchainfactor = f;} // Statistiken des Durchlaufs hinschreiben (OHNE endl davor oder danach !!) void CreateLog(std::ostream &, MPI_Comm comm = MPI_COMM_SELF); }; #endif