ExponentialCoolingSchedule.cpp
Go to the documentation of this file.
1 
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 
31  {
33  }
34 }
bool isNewCostAcceptable(double newCost, double oldCost)
this namespace contains all generally usable classes.
std::uniform_real_distribution< double > mDistribution


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