soo_function: Single Objective Optimization Function

Description Usage Arguments Value Examples

View source: R/soo_function.R

Description

Define a new soo_function object.

Usage

1
2
soo_function(name, id, fun, dimensions, lower_bounds, upper_bounds, best_value,
  best_par)

Arguments

name

Name of function.

id

Short id for the function. Must be unique to the function instance and should not contain any other characters than [a-z], [0-9] and ‘-’.

fun

Function definition.

dimensions

Size of parameter space.

lower_bounds

Lower bounds of the parameter space.

upper_bounds

Upper bounds of the parameter space.

best_value

Best known function value.

best_par

Parameter settings that correspond to best_value. If there are multiple global minima, this should be a list with one entry for each minimum.

Value

A soo_function object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Given the following simple benchmark function:
f_my_sphere <- function(x)
  sum((x-1)*(x-1))

## we can define a corresponding 2d soo_function:
f <- soo_function("My Sphere", "my-sphere-2d", f_my_sphere, 2,
                  c(-10, -10), c(10, 10),
                  0, c(1, 1))

## And then plot it:
plot(f)

olafmersmann/soobench documentation built on May 24, 2019, 12:51 p.m.