smt_optim.benchmarks.registry
Benchmarks#
- get_problem(name: str) BenchmarkProblem[source]#
Retrieves a single BenchmarkProblem object by its unique name.
- Parameters:
name (str) – The name of the problem to retrieve.
- Returns:
result – The retrieved BenchmarkProblem object, or None if no matching problem is found.
- Return type:
BenchmarkProblem or None
- list_problems(n: list[int] = None, num_obj: list[int] = [1, 1], num_dim: list[int] = None, num_cstr: list[int] = None, num_fidelity: list[int] = None, tags: list[str] = None) list[BenchmarkProblem][source]#
Retrieves all benchmark problems matching the specified filtering criteria.
- Parameters:
n (list[int], optional) –
Deprecated alias for
num_dim. A two-element list[min_num_dim, max_num_dim]specifying the inclusive range for the number of design variables.Warning
nis deprecated and will be removed in a future release. Usenum_diminstead.num_obj (list[int], optional) – A two-element list
[min_num_obj, max_num_obj]specifying the inclusive range for the number of objectives. IfNone, no filtering is applied on the number of objectives.num_dim (list[int], optional) – A two-element list
[min_num_dim, max_num_dim]specifying the inclusive range for the number of design variables. IfNone, no filtering is applied on the number of dimensions.num_cstr (list[int], optional) – A two-element list
[min_num_cstr, max_num_cstr]specifying the inclusive range for the number of constraints. IfNone, no filtering is applied on the number of constraints.num_fidelity (list[int], optional) – A two-element list
[min_num_fidelity, max_num_fidelity]specifying the inclusive range for the number of fidelity levels. IfNone, no filtering is applied on the number of fidelities.tags (list[str], optional) – A list of tags used to filter benchmark problems. A problem is returned if it contains all specified tags. If
None, no tag filtering is applied.
- Returns:
A list of benchmark problem instances matching the specified filtering criteria.
- Return type:
list[BenchmarkProblem]
Examples
Retrieve all single-objective, mono-fidelity problems, with no constraints:
>>> problems = list_problems(num_obj=[1, 1], num_cstr=[0, 0], num_fidelity=[1, 1])
Retrieve all single-objective, multi-fidelity problems:
>>> problems = list_problems(num_fidelity=[2, np.inf])
Retrieve all dimension variable benchmark problems:
>>> problems = list_problems(tags=["n_variable"])