Analytical Problems

Blackbox is primarily designed for providing an interface for high-fidelity computationally expensively problems. However, for the sake of demonstration and completeness, Blackbox contains some analytical problems that are commonly used for benchmarking optimization algorithms and surrogate models. Currently, following problems are available for use:

Basic usage

To use an analytical problem provided in Blackbox, you can follow steps outlined below:

  1. Initialize the problem class

  2. Create a sampling plan (design of experiments)

  3. Evaluate the sampling plan using the initialized problem class

The following code snippet shows an example of how to work with an analytical problem from Blackbox:

from pyDOE3 import lhs
from scipy.io import savemat
from blackbox.analytical_problems import Ackley

dim = 10

# initialize problem
problem = Ackley(num_inputs=dim)

# samples
x = lhs(dim, 10, criterion="cm")
x = problem.lb + (problem.ub - problem.lb) * x

y = problem(x) # evaluate samples

# save data
savemat('ackley_values.mat', {'x': x, 'y': y})

Refer api details for more information about how to use the analytical problems.