# testFunOptimization2d: 2D test problem for RCEIM In RCEIM: R Cross Entropy Inspired Method for Optimization

## Description

A two-dimensional problem for testing optimization methods.

This function was created for demonstrating the RCEIM package. It has the form:

f(x_1,x_2) = ((x_1-4)^2 + (x_2+2)^2)/50 - ((x_1+2)^2 + (x_2+4)^2)/90 -exp(-(x_1-2)^2) - 0.9*exp(-(x_2+2)^2) - 0.5*sin(8*x_1) - 0.25*cos(2*x_2) +0.25*sin(x_1*x_2/2) + 0.5*cos(x_2*x_1/2.5)

## Usage

 `1` ```testFunOptimization2d(x) ```

## Arguments

 `x` a vector with the point where the function is computed.

## Value

The value of the function at the requested point (x_1, x_2).

## Author(s)

Alberto Krone-Martins

`testFunOptimization`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```# Create a graphical representation of the problem with a contour plot dev.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 in 1:length(xx)){ for(j in 1: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')) ```

### Example output

```
```

RCEIM documentation built on May 29, 2017, 2:03 p.m.