Optimist  0.0.0
A C++ library for optimization
Loading...
Searching...
No Matches
Optimist::Optimizer::ExponentialDecrease3< Scalar > Class Template Reference

Inertia weight functor, which decreases exponentially over time. More...

#include <ParticleSwarm.hh>

Public Member Functions

 ExponentialDecrease3 ()
 ExponentialDecrease3 (const Scalar min_weight, const Scalar max_weight, const Scalar d_1, const Scalar d_2)
Scalar operator() (const Integer iteration, const Integer max_iterations) const

Private Attributes

Scalar m_min_weight {0.4}
Scalar m_max_weight {0.95}
Scalar m_d_1 {0.2}
Scalar m_d_2 {7.0}

Detailed Description

template<typename Scalar>
class Optimist::Optimizer::ExponentialDecrease3< Scalar >
Template Parameters
ScalarFloating-point number type. The inertia weight is calculated by the following formula:

\[ w = (w_{\max} - w_{\min} - d1) * \exp\left(\displaystyle\frac{1}{1 + d2 \frac{t}{t_{\max}}} \right) \text{.} \]

Constructor & Destructor Documentation

◆ ExponentialDecrease3() [1/2]

template<typename Scalar>
Optimist::Optimizer::ExponentialDecrease3< Scalar >::ExponentialDecrease3 ( )
inline

Class constructor with minimum and maximum weights equal to 0.4 and 0.95, respectively, and control factors equal to 0.2 and 7.0.

◆ ExponentialDecrease3() [2/2]

template<typename Scalar>
Optimist::Optimizer::ExponentialDecrease3< Scalar >::ExponentialDecrease3 ( const Scalar min_weight,
const Scalar max_weight,
const Scalar d_1,
const Scalar d_2 )
inline

Class constructor that accepts the minimum and maximum weight of the exponential decrease and the two control factors.

Parameters
[in]min_weightLower bound of the inertia weight
[in]max_weightUpper bound of the inertia weight
[in]d_1First control factor
[in]d_2Second control factor

Member Function Documentation

◆ operator()()

template<typename Scalar>
Scalar Optimist::Optimizer::ExponentialDecrease3< Scalar >::operator() ( const Integer iteration,
const Integer max_iterations ) const
inline

Get the inertia weight.

Parameters
[in]iterationCurrent iteration.
[in]max_iterationsMaximum number of iterations.
Returns
The inertia weight.

Member Data Documentation

◆ m_d_1

template<typename Scalar>
Scalar Optimist::Optimizer::ExponentialDecrease3< Scalar >::m_d_1 {0.2}
private

First control factor

◆ m_d_2

template<typename Scalar>
Scalar Optimist::Optimizer::ExponentialDecrease3< Scalar >::m_d_2 {7.0}
private

Second control factor

◆ m_max_weight

template<typename Scalar>
Scalar Optimist::Optimizer::ExponentialDecrease3< Scalar >::m_max_weight {0.95}
private

Maximum inertia weight

◆ m_min_weight

template<typename Scalar>
Scalar Optimist::Optimizer::ExponentialDecrease3< Scalar >::m_min_weight {0.4}
private

Minimum inertia weight


The documentation for this class was generated from the following file: