EngiBench: A standard API, Open-Source Datasets and Benchmarks for Engineering Design#
EngiBench offers a collection of engineering design problems, datasets, and benchmarks to facilitate the development and evaluation of optimization and machine learning algorithms for engineering design. Our goal is to provide a standard API to enable researchers to easily compare and evaluate their algorithms on a wide range of engineering design problems.
API#
from engibench.problems.beams2d.v0 import Beams2D
# Create a problem
problem = Beams2D()
# Inspect problem
problem.design_space # Box(0.0, 1.0, (50, 100), float64)
problem.objectives # (("compliance", "MINIMIZE"),)
problem.conditions # (("volfrac", 0.35), ("forcedist", 0.0),...)
problem.dataset # A HuggingFace Dataset object
# Train your models, e.g., inverse design
# inverse_model = train_inverse(problem.dataset)
desired_conds = {"volfrac": 0.7, "forcedist": 0.3}
# generated_design = inverse_model.predict(desired_conds)
random_design, _ = problem.random_design()
# check constraints on the design, config pair
violated_constraints = problem.check_constraints(design=random_design, config=desired_conds)
if not violated_constraints:
# Only simulate to get objective values
objs = problem.simulate(design=random_design, config=desired_conds)
# Or run a gradient-based optimizer to polish the design
opt_design, history = problem.optimize(starting_point=random_design, config=desired_conds)
Installation#
pip install engibench
You can also specify additional dependencies for specific problems:
pip install "engibench[beams2d]"
Or you can install all dependencies for all problems:
pip install "engibench[all]"
Citing#
If you use EngiBench in your research, please cite the following paper:
TODO