Describes a black-box objective function that maps an arbitrary domain to a numerical codomain.

## Technical details

Objective objects can have the following properties: "noisy", "deterministic", "single-crit" and "multi-crit".

## Public fields

id

(character(1))).

properties

(character()).

domain

Specifies domain of function, hence its input parameters, their types and ranges.

codomain

Specifies codomain of function, hence its feasible values.

constants

Changeable constants or parameters that are not subject to tuning can be stored and accessed here.

check_values

(logical(1))

## Active bindings

xdim

(integer(1))
Dimension of domain.

ydim

(integer(1))
Dimension of codomain.

## Methods

### Method new()

Creates a new instance of this R6 class.

#### Usage

Objective$new( id = "f", properties = character(), domain, codomain = ParamSet$new(list(ParamDbl$new("y", tags = "minimize"))), constants = ParamSet$new(),
check_values = TRUE
)

#### Arguments

id

(character(1)).

properties

(character()).

domain

Specifies domain of function. The paradox::ParamSet should describe all possible input parameters of the objective function. This includes their id, their types and the possible range.

codomain

Specifies codomain of function. Most importantly the tags of each output "Parameter" define whether it should be minimized or maximized. The default is to minimize each component.

constants

Changeable constants or parameters that are not subject to tuning can be stored and accessed here.

check_values

(logical(1))
Should points before the evaluation and the results be checked for validity?

### Method format()

Helper for print outputs.

#### Returns

character().

### Method eval()

Evaluates a single input value on the objective function. If check_values = TRUE, the validity of the point as well as the validity of the result is checked.

#### Arguments

xss

(list())
A list of lists that contains multiple x values, e.g. list(list(x1 = 1, x2 = 2), list(x1 = 3, x2 = 4)).

#### Returns

data.table::data.table()] that contains one y-column for single-criteria functions and multiple y-columns for multi-criteria functions, e.g. data.table(y = 1:2) or data.table(y1 = 1:2, y2 = 3:4). It may also contain additional columns that will be stored in the archive if called through the OptimInstance. These extra columns are referred to as extras.

### Method eval_dt()

Evaluates multiple input values on the objective function

#### Arguments

deep

Whether to make a deep clone.