Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
combinatorial_optimization
CostDeltaAcceptanceFunction.cpp
Go to the documentation of this file.
1
18
#include "
CostDeltaAcceptanceFunction.hpp
"
19
20
namespace
ISM
21
{
22
bool
CostDeltaAcceptanceFunction::isNewCostAcceptable
(
double
newCost,
double
oldCost)
23
{
24
return
newCost < (1 +
mCurrentAcceptableCostDelta
) * oldCost;
25
}
26
27
void
CostDeltaAcceptanceFunction::update
()
28
{
29
mCurrentAcceptableCostDelta
=
30
std::max(0.,
mCurrentAcceptableCostDelta
-
mInitialAcceptableCostDelta
*
mCostDeltaDecreaseFactor
);
31
}
32
33
void
CostDeltaAcceptanceFunction::reset
()
34
{
35
mCurrentAcceptableCostDelta
=
mInitialAcceptableCostDelta
;
36
}
37
}
ISM::CostDeltaAcceptanceFunction::mCurrentAcceptableCostDelta
double mCurrentAcceptableCostDelta
Definition:
CostDeltaAcceptanceFunction.hpp:42
ISM::CostDeltaAcceptanceFunction::update
void update()
Definition:
CostDeltaAcceptanceFunction.cpp:27
ISM::CostDeltaAcceptanceFunction::mCostDeltaDecreaseFactor
double mCostDeltaDecreaseFactor
Definition:
CostDeltaAcceptanceFunction.hpp:43
ISM::CostDeltaAcceptanceFunction::reset
void reset()
Definition:
CostDeltaAcceptanceFunction.cpp:33
ISM::CostDeltaAcceptanceFunction::mInitialAcceptableCostDelta
double mInitialAcceptableCostDelta
Definition:
CostDeltaAcceptanceFunction.hpp:41
ISM::CostDeltaAcceptanceFunction::isNewCostAcceptable
bool isNewCostAcceptable(double newCost, double oldCost)
Definition:
CostDeltaAcceptanceFunction.cpp:22
CostDeltaAcceptanceFunction.hpp
ISM
this namespace contains all generally usable classes.
Definition:
AcceptanceFunction.hpp:22
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