panobbgo.lib.Problem#
- class panobbgo.lib.Problem(box: List[Tuple[float, float]] | Sequence[Tuple[float, float]] | Tuple[Tuple[float, float], ...], dx: ndarray | List[float] | Tuple[float, ...] | None = None)[source]#
this is used to store the objective function, information about the problem, etc.
- Parameters:
box (list) – list of tuples for the bounding box with length n, e.g.: \(\left[ (-1,1), (-100, 0), (0, 0.01) \right]\).
dx (list) – translation of the whole problem, an n-dimensional vector (default: None). The search box becomes
box + dxand the objective is evaluated atx - dx, i.e. the problem seen by the optimiser is \(g(x) = f(x - dx)\) and a minimiser \(x^*\) of \(f\) moves to \(x^* + dx\). Every point the objective sees lies in the originalbox.
- __init__(box: List[Tuple[float, float]] | Sequence[Tuple[float, float]] | Tuple[Tuple[float, float], ...], dx: ndarray | List[float] | Tuple[float, ...] | None = None) None[source]#
- Parameters:
box (list) – list of tuples for the bounding box with length n, e.g.: \(\left[ (-1,1), (-100, 0), (0, 0.01) \right]\).
dx (list) – translation of the whole problem, an n-dimensional vector (default: None). The search box becomes
box + dxand the objective is evaluated atx - dx, i.e. the problem seen by the optimiser is \(g(x) = f(x - dx)\) and a minimiser \(x^*\) of \(f\) moves to \(x^* + dx\). Every point the objective sees lies in the originalbox.
Methods
__init__(box[, dx])eval(x)This is called to evaluate the given black-box function.
This method is optionally overwritten by the problem to calculate the constraint violations.
project(point)projects given point into the search box.
random_point([distribution, rng])Generates a random point inside the given search box.
Attributes