CoolingSchedule.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <boost/shared_ptr.hpp>
21 
22 #include "AcceptanceFunction.hpp"
23 
24 namespace ISM {
25 
27 {
28  public:
29  CoolingSchedule(double startTemperature, double endTemperature, unsigned repetitionsBeforeUpdate)
30  : mStartTemperature(startTemperature)
31  , mEndTemperature(endTemperature)
32  , mCurrentTemperature(startTemperature)
33  , mRepetitionsBeforeUpdate(repetitionsBeforeUpdate)
34  {}
35 
36  virtual bool isNewCostAcceptable(double newCost, double oldCost) = 0;
37  virtual void update() = 0;
38 
39  void reset();
40  bool hasReachedEnd();
41  unsigned getRepetitionsBeforeUpdate();
42 
43  protected:
44  const double mStartTemperature;
45  const double mEndTemperature;
47 
49 
50 }; typedef boost::shared_ptr<CoolingSchedule> CoolingSchedulePtr;
51 
52 }
boost::shared_ptr< CoolingSchedule > CoolingSchedulePtr
const double mStartTemperature
unsigned getRepetitionsBeforeUpdate()
const double mEndTemperature
virtual bool isNewCostAcceptable(double newCost, double oldCost)=0
this namespace contains all generally usable classes.
virtual void update()=0
CoolingSchedule(double startTemperature, double endTemperature, unsigned repetitionsBeforeUpdate)


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:40