Learn R Programming

DiceOptim (version 2.1.1)

goldsteinprice: 2D test function

Description

Goldstein-Price 2-dimensional test function.

Usage

goldsteinprice(x)

Arguments

x

a 2-dimensional vector specifying the location where the function is to be evaluated.

Value

A real number equal to the goldsteinprice function values at x

Details

The goldsteinprice (standardized version) function is defined over the domain [0,1]^2. It has 1 global minimizer : x* = c(0.5, 0.25), with minimum f(x*) = -3.129172, and 3 local minima x*,2 = c(0.35, 0.4), x*,3 = c(0.95, 0.55), x*,4 = c(0.8 , 0.7), with respective minima f(x*,2) = -2.180396, f(x*,3) = -1.756143, f(x*,4) = -0.807367.

Examples

Run this code
# NOT RUN {
 
design <- matrix(runif(200), 200, 2)
response <- apply(design, 1, goldsteinprice)

# }

Run the code above in your browser using DataLab