Inertia weight functor, which decreases exponentially over time.
More...
#include <ParticleSwarm.hh>
template<typename Scalar>
class Optimist::Optimizer::ExponentialDecrease3< Scalar >
- Template Parameters
-
| Scalar | Floating-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{.}
\]
|
◆ ExponentialDecrease3() [1/2]
template<typename Scalar>
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>
Class constructor that accepts the minimum and maximum weight of the exponential decrease and the two control factors.
- Parameters
-
| [in] | min_weight | Lower bound of the inertia weight |
| [in] | max_weight | Upper bound of the inertia weight |
| [in] | d_1 | First control factor |
| [in] | d_2 | Second control factor |
◆ operator()()
template<typename Scalar>
Get the inertia weight.
- Parameters
-
| [in] | iteration | Current iteration. |
| [in] | max_iterations | Maximum number of iterations. |
- Returns
- The inertia weight.
◆ m_d_1
template<typename Scalar>
◆ m_d_2
template<typename Scalar>
◆ m_max_weight
template<typename Scalar>
◆ m_min_weight
template<typename Scalar>
The documentation for this class was generated from the following file: