Developer API for benchmarking problems

class smt.problems.problem.Problem(**kwargs)[source]

Methods

__call__(x[, kx])

Evaluate the function.

_initialize() None[source]

Implemented by problem to declare options (optional).

Examples

self.options.declare(‘option_name’, default_value, types=(bool, int), desc=’description’)

_evaluate(x: ndarray, kx: Optional[int] = None) ndarray[source]

Implemented by surrogate models to evaluate the function.

Parameters
xndarray[n, nx]

Evaluation points where n is the number of evaluation points.

kxint or None

Index of derivative (0-based) to return values with respect to. None means return function value rather than derivative.

Returns
ndarray[n, 1]

Functions values if kx=None or derivative values if kx is an int.