Dataset Viewer

The dataset viewer should be available soon. Please retry later.

Dataset Card for Distributional MIPLIB (D-MIPLIB)

🌐 website

Introducing Distributional MIPLIB (D-MIPLIB), the first comprehensive standardized dataset for evaluating ML-guided Mixed Integer Linear Programming (MILP) solving. Details of D-MIPLIB can be found on our website.

Composition

Distributional MIPLIB contains MILP distributions from 15 application domains and of different hardness levels. A list of all the domains and all the distributions is provided at website. Each distribution contains a set of similar MILP optimization problem instances that correspond to the same model (a class of combinatorial optimization with specific parameters).

For each distribution, there are 1000 instances in total, except for cases where more instances have been made publicly available previously or when limited instances are available. For Neural Network Verification, there are 3692 instances in total. Maritime Inventory Routing Problem contains 118 instances. Seismic-Resilient Pipe Network Planning domain contains 219 and 206 instances in the Easy and Hard distribution, respectively. Wildfire-Aware Optimal Transmission Switching contains 540 instances.

Loading MILP instances

MILP instances in this library are stored as text strings. The code below downloads one distribution (a config listed above, e.g. CA-easy) and writes every instance to disk as an *.lp or *.mps file, depending on its format. Instances are named by split and position: train_{id}, validation_{id} and test_{id}, where id ranges from 0 to N-1 and N is the number of instances in that split (for example, train_0.lp to train_799.lp, validation_0.lp to validation_99.lp and test_0.lp to test_99.lp).

import ast
import os
from datasets import load_dataset

config = "CA-easy"  # any config name, e.g. "GISP-hard", "WF_OTS_UG-medium"
out_dir = f"./{config}"
os.makedirs(out_dir, exist_ok=True)

dataset = load_dataset("weiminhu/D-MIPLIB", config)
for split in ["train", "validation", "test"]:
    if split not in dataset:
        continue
    for i, row in enumerate(dataset[split]):
        # each MILP is stored as the string form of the file's bytes; files are .lp unless 'format' says otherwise
        file_format = row.get("format") or "lp"
        text = ast.literal_eval(row["MILP"]).decode("utf-8")
        with open(os.path.join(out_dir, f"{split}_{i}.{file_format}"), "w") as file:
            file.write(text)

To load and solve an instance in Gurobi, run

import gurobipy as gp

model = gp.read("./CA-easy/test_0.lp")
model.optimize()

License

Instances data in different domains is licensed under different licenses, as we curated the data from different sources.

Citation

BibTeX:

@misc{huang2024distributional,
      title={Distributional MIPLIB: a Multi-Domain Library for Advancing ML-Guided MILP Methods}, 
      author={Weimin Huang and Taoan Huang and Aaron M Ferber and Bistra Dilkina},
      year={2024},
      eprint={2406.06954},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
Downloads last month
1,606

Paper for weiminhu/D-MIPLIB