|
OPTK
0.1.2
Toolkit for global optimisation algorithms
|
#include <synthetic.hpp>
Public Member Functions | |
| deflected_corrugated_spring (int dims) | |
| double | evaluate (inst::set x) override |
Public Member Functions inherited from syn::synthetic | |
| synthetic (const std::string &n, u_int dims, double lb, double ub, double opt) | |
| synthetic (const std::string &n, u_int dims, double opt) | |
| ~synthetic () | |
| sspace::sspace_t * | get_search_space () |
| void | set_properties (std::vector< properties > p) |
| std::vector< properties > | get_properties () |
| inst::set | get_opt_param () |
| double | get_opt () |
| void | update_opt (double opt) |
| u_int | get_dims () |
| void | validate_param_set (inst::set x) |
Public Member Functions inherited from optk::benchmark | |
| benchmark (const std::string &name) | |
| std::string | get_name () |
Additional Inherited Members | |
Protected Member Functions inherited from syn::synthetic | |
| void | set_opt_param (inst::set op) |
Protected Attributes inherited from syn::synthetic | |
| u_int | m_dims |
| double | m_lb |
| double | m_ub |
| double | m_opt |
| std::vector< properties > | m_properties |
| inst::set | opt_params |
| sspace::sspace_t | m_sspace |
Protected Attributes inherited from optk::benchmark | |
| std::string | m_name |
The (type III) Complex Deceptive Problem is given by
\[ f(\mathbf{x}) = -\left[ \frac{1}{n}\sum^n_{i=1}g_i(x_i)\right]^\beta, \]
where \(\beta\) is a non-linearity factor. Here we take \(\beta = 2\). Further
\[ g_i(x_i) = \begin{cases} x_i &\text{if } x_i < 0\\ -\frac{x_i}{\alpha_i} + \frac{4}{5} &\text{if } 0\le x_i \le \frac{4}{5}\alpha_i \\ \frac{5x_i}{\alpha_i} - 4 &\text{if } \frac{4}{5}\alpha_i \le x_i < \alpha_i \\ \frac{5(x_i - \alpha_i)}{\alpha_i - 1}+1 &\text{if } \alpha_i \le x+o < \frac{1 + 4\alpha_i}{5} \\ \frac{x_i - 1}{1-\alpha_i} + \frac{4}{5} &\text{otherwise.} \end{cases} \]
For each dimension, we select \(\alpha_i \in (0, 1)\). The parameters are constrained such that \(0\le x_i \le 1\). The global minimum arises at \(\mathbf{x}_i^* = \alpha_i\), with value f({x}^*) = -1. \(. */ class deceptive: public synthetic { public: deceptive (int dims); double evaluate (inst::set x) override; }; /** The deflected corrugated spring benchmark has the following formula: \f[ f(\mathbf{x}) = 0.1 \sum^n_{i=1}(x_i - \alpha)^2 - \cos \left( k \sqrt{\sum^n_{i=1}(x_i - \alpha)^2}\right), \f] where \) = k = 5 x_i 2$. The global minimum is located at \(x^*_i = \alpha\) with a value of \(f(\mathbf{x}^*) = -1\).
|
overridevirtual |
Evaluate the benchmark (i.e. calculate the value of the objective fuinction) on the provided values.
| x | A vector of double-precision values to evaluate the benchmark at. |
Implements optk::benchmark.
1.8.13