A multimodal test function from the Shekel family with 5 local minima. Fixed dimension of 4.

F21(x)

Arguments

x

Numeric vector of length 4 (4-dimensional input).

Value

Numeric scalar representing the function value.

Details

Formula: $$f(x) = -\sum_{i=1}^{5} \frac{1}{(x - a_i)^T(x - a_i) + c_i}$$

where \(a_i\) are 4-dimensional vectors and \(c_i\) are scalars.

Global minimum: \(f(4, 4, 4, 4) \approx -10.1532\)

Characteristics:

  • Type: Multimodal

  • Separable: No

  • Differentiable: Yes

  • Fixed dimension: 4

  • Number of local minima: 5

  • Default bounds: \([0, 10]^4\)

The Shekel functions are parameterized by the number of terms m (here m=5). As m increases, the function becomes more challenging.

See also

test-functions for an overview of all test functions, get_function_details to retrieve function parameters, F22 for Shekel 7, F23 for Shekel 10.

Examples

F21(c(4, 4, 4, 4))  # Returns approximately -10.15 (near global minimum)
#>          [,1]
#> [1,] -10.1532
F21(c(0, 0, 0, 0))  # Returns a value close to 0
#>            [,1]
#> [1,] -0.2731153