Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
combinatorial_optimization
ExponentialCoolingSchedule.cpp
Go to the documentation of this file.
1
18
#include "
ExponentialCoolingSchedule.hpp
"
19
20
namespace
ISM
{
21
22
bool
ExponentialCoolingSchedule::isNewCostAcceptable
(
double
newCost,
double
oldCost)
23
{
24
if
(newCost < oldCost)
return
true
;
25
26
double
acceptanceProbability = std::exp(-(newCost - oldCost) /
mCurrentTemperature
);
27
return
acceptanceProbability >=
mDistribution
(
mGenerator
);
28
}
29
30
void
ExponentialCoolingSchedule::update
()
31
{
32
mCurrentTemperature
*=
mTemperatureFactor
;
33
}
34
}
ISM::ExponentialCoolingSchedule::mGenerator
std::default_random_engine mGenerator
Definition:
CostDifferenceDeltaAcceptanceFunction.hpp:42
ExponentialCoolingSchedule.hpp
ISM::ExponentialCoolingSchedule::update
void update()
Definition:
ExponentialCoolingSchedule.cpp:30
ISM::ExponentialCoolingSchedule::isNewCostAcceptable
bool isNewCostAcceptable(double newCost, double oldCost)
Definition:
ExponentialCoolingSchedule.cpp:22
ISM::ExponentialCoolingSchedule::mTemperatureFactor
double mTemperatureFactor
Definition:
CostDifferenceDeltaAcceptanceFunction.hpp:40
ISM::CoolingSchedule::mCurrentTemperature
double mCurrentTemperature
Definition:
CoolingSchedule.hpp:46
ISM
this namespace contains all generally usable classes.
Definition:
AcceptanceFunction.hpp:22
ISM::ExponentialCoolingSchedule::mDistribution
std::uniform_real_distribution< double > mDistribution
Definition:
CostDifferenceDeltaAcceptanceFunction.hpp:43
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