Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
combinatorial_optimization
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
26
class
CoolingSchedule
:
public
AcceptanceFunction
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
;
46
double
mCurrentTemperature
;
47
48
unsigned
mRepetitionsBeforeUpdate
;
49
50
};
typedef
boost::shared_ptr<CoolingSchedule>
CoolingSchedulePtr
;
51
52
}
ISM::AcceptanceFunction
Definition:
AcceptanceFunction.hpp:24
ISM::CoolingSchedulePtr
boost::shared_ptr< CoolingSchedule > CoolingSchedulePtr
Definition:
CoolingSchedule.hpp:50
ISM::CoolingSchedule::hasReachedEnd
bool hasReachedEnd()
Definition:
CoolingSchedule.cpp:22
ISM::CoolingSchedule::mStartTemperature
const double mStartTemperature
Definition:
CoolingSchedule.hpp:44
ISM::CoolingSchedule::getRepetitionsBeforeUpdate
unsigned getRepetitionsBeforeUpdate()
Definition:
CoolingSchedule.cpp:27
ISM::CoolingSchedule::mCurrentTemperature
double mCurrentTemperature
Definition:
CoolingSchedule.hpp:46
ISM::CoolingSchedule::mEndTemperature
const double mEndTemperature
Definition:
CoolingSchedule.hpp:45
ISM::CoolingSchedule::reset
void reset()
Definition:
CoolingSchedule.cpp:32
AcceptanceFunction.hpp
ISM::CoolingSchedule::isNewCostAcceptable
virtual bool isNewCostAcceptable(double newCost, double oldCost)=0
ISM::CoolingSchedule
Definition:
CoolingSchedule.hpp:26
ISM
this namespace contains all generally usable classes.
Definition:
AcceptanceFunction.hpp:22
ISM::CoolingSchedule::update
virtual void update()=0
ISM::CoolingSchedule::mRepetitionsBeforeUpdate
unsigned mRepetitionsBeforeUpdate
Definition:
CoolingSchedule.hpp:48
ISM::CoolingSchedule::CoolingSchedule
CoolingSchedule(double startTemperature, double endTemperature, unsigned repetitionsBeforeUpdate)
Definition:
CoolingSchedule.hpp:29
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