#ifdef MPI #ifndef SA_TIMESCHEDULER_H #define SA_TIMESCHEDULER_H #include "SA_Problem.h" // #include "SA_SeqEasyScheduler.h" #include "SA_EasyScheduler.h" #include #include #include /** This scheduler guarantees a certain timelimit for the optimization process. If no solution quality goal is set the subchains are adapted and the scheduler freezes after timelimit seconds. If an solution quality goal is set, no subchain adaption is made and the scheduler freezes also if the goal is reached before the time has expired. @author Karsten Klohs @version 1.2 */ class SA_TimeScheduler : public SA_EasyScheduler { private: double avgitert; double avgdeltac; long ets; float EndT; /// solution quality goal, must be given as a value of the cost function float SQGoal; /// sqset = 0 => no solution quality goal given, otherwise value is 1 int sqset; int iterate(float, float, float); void determineAvgIterTime(SA_Problem *, SA_Solution *, SA_Solution *); void eastimateTempSteps(); public: SA_TimeScheduler(); int ReadConfig(std::istream &); // void WarmingUp(SA_Problem &, SA_Solution &, SA_Solution &); void WarmingUp(SA_Problem &, SA_Solution &, SA_Solution &, MPI_Comm); int Frozen(); }; #endif #endif // MPI