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

#include <synthetic.hpp>

Inheritance diagram for syn::bartels_conn:
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

The adjiman function has formula

\[ f(x) = \cos(x_1)\sin(x_2) - \frac{x_1}{(x_2^2+1)}, \]

with only two parameters \(x_1\) and $fx_2$f, subject to \(-1 \le x_1 \le 2\) and \(-1 \le x_2 \le 1\). The global minimum is located on the boundary of the search space at \(\mathbf{x}^* = (2, 0.10578)\), with minimum $ff({x}^*) = -2.02181 \(. */ class adjiman: public synthetic { public: adjiman (); double evaluate(inst::set x) override; }; /** The alpine1 function has formula \f[ f(x) = \sum^D_{i=1}\left\vert x_i\sin(x_i) + 0.1 x_i\right\vert, \f] with \) \( parameters subject to \)-10 x_i 10 \(. The global minimum is located at the origin; \){x}^* = (0, , 0) \(, with value \$ff(\mathbf{x}^*) = 0\). */ class alpine1: public synthetic { public: alpine1 (int dims); double evaluate(inst::set x) override; };

/** The alpine2 function has formula

\[ f(x) = \prod^D_{i=1}\sqrt{x_i}\sin(x_i), \]

with \(D\) parameters subject to \(0 \le x_i \le 10\). The global minimum is located at \(\mathbf{x}^* = (7.917, \ldots, 7.917)\), with value $ff({x}^*) = 2.808^D \(. */ class alpine2: public synthetic { public: alpine2 (int dims); double evaluate(inst::set x) override; }; /** The brad function comes from 'A Comparison of Gradient Methods for the Solution of Nonlinear Parameter Estimation Problems' (https://doi.org/10.1137/0707011), and is a modified version of Problem 1, p170. We give it the formula \f[ f(x) = \sum^15_{i=1}\left[ \frac{y_i - x_1 - i} {(16-i)\cdot x_2 + \min(i, 16-i)\cdot x_3} \right]^2, \f] where \) = [0.14, 0.18, 0.22, 0.25, 0.29, 0.32, 0.35, 0.39, 0.37, 0.58, 0.73, 0.96, 1.34, 2.10, 4.39]^T \(. The three parameters are subject to \)-0.25 x_1 0.25

\[ w_i = 1 + \frac{x_i - 1}{4}, \forall i \in \{1, \ldots, d\}. \]

.01 x_2, x_3 2.5 \(. The global minimum is located at \){x}^* = (0.08241040, 1.133033, 2.343697)$, with \((\mathbf{x}^*) = 0.00821488 \). */ class brad: public synthetic { public: brad (); double evaluate(inst::set x) override; };

/** The bartels conn function has the formula

\[ f(x) = \vert x_1^2 + x_2^2 + x_1x_2\vert + \vert \sin(x_1)\vert + \vert \cos(x_2)\vert, \]

subject to \(-500 \le x_i \le 500\), with the global minimum located at \(\mathbf{x}^* = (0,0)\), with \(f(\mathbf{x}^*) = 1\).

Member Function Documentation

◆ evaluate()

double syn::bartels_conn::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: