OPTK  0.1.2
Toolkit for global optimisation algorithms
Public Member Functions | List of all members
syn::langermann2 Class Reference

#include <synthetic.hpp>

Inheritance diagram for syn::langermann2:
syn::synthetic optk::benchmark

Public Member Functions

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_tget_search_space ()
 
void set_properties (std::vector< properties > p)
 
std::vector< propertiesget_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< propertiesm_properties
 
inst::set opt_params
 
sspace::sspace_t m_sspace
 
- Protected Attributes inherited from optk::benchmark
std::string m_name
 

Detailed Description

Judge's function has the following formula:

\[ f(\mathbf{x}) = \sum^{20}_{i=1}\left( (x_1 + B_ix_2 + C_ix_2^2) - A_i \right)^2 \]

, where the vectors A, B and C are given by:

\[ \begin{align*} A &= \begin{bmatrix} 4.284 & 4.149 & 3.877 & 0.533 & 2.211 & 2.389 & 2.145 & 3.231 & 1.998 & 1.379 & 2.106 & 1.428 & 1.011 & 2.179 & 2.858 & 1.388 & 1.651 & 1.593 & 1.046 & 2.152 \end{bmatrix} \\ B &= \begin{bmatrix} 0.286 & 0.973 & 0.384 & 0.276 & 0.973 & 0.543 & 0.957 & 0.948 & 0.543 & 0.797 & 0.936 & 0.889 & 0.006 & 0.828 & 0.399 & 0.617 & 0.939 & 0.784 & 0.072 & 0.889 \end{bmatrix} \\ C &= \begin{bmatrix} 0.645 & 0.585 & 0.310 & 0.058 & 0.455 & 0.779 & 0.259 & 0.202 & 0.028 & 0.099 & 0.142 & 0.296 & 0.175 & 0.180 & 0.842 & 0.039 & 0.103 & 0.620 & 0.158 & 0.704 \end{bmatrix} \end{align*} \]

subject to \(-10 \le x_i \le 10\) for \(i = 1,2\$, with a global minimum located at \){x}^* = (0.86479, 1.2357) \( with value \)({x}^*) = 16.0817307 \(. */ class judge: public synthetic { public: judge (); double evaluate (inst::set x) override; }; /** The Langermann 2 function has the following formula: \f[ f(\mathbf{x}) = -\sum^m_{i=1}c_i e^{-\frac{1}{\pi} \sum^D_{j=1}(x_j-a_{ij})^2} \cos\left(\pi\sum^D_{j=1}(x_j-a_{ij})^2\right), \f] where \){a} \(, \){b} \( and \){c} \( are the following vectors: \f[ \begin{align*} \mathbf{a} &= \begin{bmatrix} 3 & 5 & 2 & 1 & 7 \end{bmatrix} \\ \mathbf{b} &= \begin{bmatrix} 5 & 2 & 1 & 4 & 9 \end{bmatrix} \\ \mathbf{c} &= \begin{bmatrix} 1 & 2 & 5 & 2 & 3 \end{bmatrix}. \f] The parameters are subject to \) x_i 10 \( and there is a global minimum located at \){x}^* = (2.00299219, 1.006096) \( with value \)({x}^*) = -5.1621259

Member Function Documentation

◆ evaluate()

double syn::langermann2::evaluate ( inst::set  x)
overridevirtual

Evaluate the benchmark (i.e. calculate the value of the objective fuinction) on the provided values.

Parameters
xA vector of double-precision values to evaluate the benchmark at.
Todo:
Verify that a vector of doubles does not constrict the range of benchmark functions which may be evaluated (i.e. as opposed to categorical variables such as strings).

Implements optk::benchmark.


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