Skip to content

BenchmarkProblemFactory

BenchmarkProblemFactory

Factory class for conveniently constructing MaxDivProblem instances for benchmarking purposes.

This class makes all registered (and discovered) BenchmarkProblem subclasses available (see show_all) and allows creating corresponding MaxDivProblem instances by name & parameter values (see create_problem).

construct_problem classmethod

construct_problem(name: str, **params) -> MaxDivProblem

Create and return an instance of MaxDivProblem for the benchmark problem with the given name, using the provided parameters as needed.

get_all_benchmark_problems classmethod

get_all_benchmark_problems() -> dict[str, Type[BenchmarkProblem]]

Return a dict mapping benchmark problem names to their classes.

get_all_benchmark_names classmethod

get_all_benchmark_names() -> list[str]

Return a sorted list of all registered benchmark problem names.

get_problem_dimensions classmethod

get_problem_dimensions(name: str, **params) -> tuple[int, int, int, int, int]

Get problem dimensions as (d, n, k, m, n_con_indices)-tuple for the benchmark problem with the given name, using the provided parameters as needed.

show_all classmethod

show_all()

Show all registered benchmark problems and their parameters