Utilities for loading and working with the FormulationBench dataset.
Project description
formulation-bench
Python utilities for loading and working with the FormulationBench dataset. FormulationBench is a collection of 20 optimization problems with 116 mixed-integer linear programming (MILP) formulations. Each formulation has a natural language description, LaTeX formulation, GurobiPy implementation, and Lean representation. Furthermore, there are 96 pairs of formulations consisting of 70 positive reformulation examples and 26 negative examples. Each positive example has a machine-checked Lean 4 reformulation proof. See the documentation for details.
Installation
pip install formulation-bench
Quickstart
Download the dataset:
from formulation_bench import Dataset
ds = Dataset.load()
Access a problem's formulations:
p1 = ds.problems[1]
p1a = p1.formulations["a"]
Access reformulation pairs:
pos = [r for r in ds.reformulations if r.is_reformulation]
neg = [r for r in ds.reformulations if not r.is_reformulation]
Development
See AGENTS.md for development information.
Cite
TODO: Add arXiv article citation
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file formulation_bench-0.3.0.tar.gz.
File metadata
- Download URL: formulation_bench-0.3.0.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e3498e2b49c9b9b2dd7146bc1b0cc8caab11789d6545040e5dd9a94b575b3f
|
|
| MD5 |
110943edb0076f80727206172bb6ec2f
|
|
| BLAKE2b-256 |
245e5ea38da7d3372526950bee342783b1c000177b568afb3a4f53a292b91840
|
File details
Details for the file formulation_bench-0.3.0-py3-none-any.whl.
File metadata
- Download URL: formulation_bench-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9412a4a4910ce1c365f1a005b4ca39360b74bf28b65ef191fd6f3d97a38b8ffd
|
|
| MD5 |
6240ad373a632bbd6d65dcefff014908
|
|
| BLAKE2b-256 |
5a20135f8c898008f82222381a1431c4370471491141a94be047f703e7ae8673
|