A two-dimensional problem for testing optimization methods.
This function was created for demonstrating the RCEIM package. It has the form:
testFunOptimization2d(x)
Arguments
x: a vector with the point where the function is computed.
Returns
The value of the function at the requested point (x_1, x_2).
Author(s)
Alberto Krone-Martins
See Also
testFunOptimization
Examples
# Create a graphical representation of the problem with a contour plotdev.new()xx <- seq(-10,10,by=0.1)yy <- seq(-10,10,by=0.1)zz <- matrix(nrow=length(yy), ncol=length(xx))for(i in1:length(xx)){for(j in1:length(yy)){ zz[i,j]<- testFunOptimization2d( c(xx[i],yy[j]))}}image(xx,yy,zz, col=gray((50:100)/100), xlab="x", ylab="y")contour(xx,yy,zz, add=TRUE)rm(list=c('xx','yy','zz'))