Skip to content

Add initial LP benchmark importer for converting LP problems to volesti H-polytopes#467

Open
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:lp-importer
Open

Add initial LP benchmark importer for converting LP problems to volesti H-polytopes#467
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
ChinmayRout9040895625:lp-importer

Conversation

@ChinmayRout9040895625
Copy link
Copy Markdown

This PR introduces a minimal import pipeline for converting linear programming (LP) benchmark problems into volesti-compatible H-polytopes. Many standard benchmark datasets (e.g., Netlib LP problems) are not directly usable with volesti because they are not provided in explicit inequality form. This contribution provides a first step toward a reproducible benchmark import suite by converting LP constraints into the Ax ≤ b representation required by volesti.

Although volesti provides efficient algorithms for sampling and volume computation of convex polytopes, preparing real-world benchmark instances requires manual preprocessing. In particular, LP test problems typically include equality constraints and variable bounds rather than explicit inequalities.

This PR aims to lower the barrier to using such datasets by providing a simple and transparent conversion pipeline.

What this PR adds

  • A header-only LP importer
    'include/volesti/io/lp_importer.h'
  • Conversion of equality constraints and variable bounds into Ax ≤ b form
  • Basic structural validation utilities
  • An example program demonstrating an end-to-end workflow
    (dataset → conversion → polytope construction)
  • A small benchmark instance for testing

Conversion Strategy

Equality constraints are transformed as:
Ax = b → Ax ≤ b and −Ax ≤ −b
Variable bounds are converted as:
l ≤ x ≤ u → x ≤ u and −x ≤ −l

This produces a pure inequality system compatible with volesti's H-polytope representation.

Validation

Basic checks implemented:

  • Dimension consistency (A.rows() == b.size())
  • Finite numeric values
  • Non-empty constraint system
    These checks help detect malformed inputs before constructing the polytope.

Example Workflow

The included example demonstrates:

  1. Reading a small LP-style input
  2. Converting constraints to Ax ≤ b
  3. Constructing a volesti H-polytope
  4. Verifying dimensions

Future Extensions

This implementation is intentionally minimal and can be extended to support:

  • Additional LP formats (e.g., MPS, CPLEX LP)
  • Import of metabolic flux polytopes (e.g., from Dingo models)
  • Automated benchmark conversion pipelines
  • Advanced validation (redundancy detection, feasibility checks)

Testing

  • Example program compiles and runs successfully
  • Validation passes on the provided benchmark instance

Request for Feedback

I would appreciate guidance on:

  • Recommended directions for expanding benchmark support

This implementation is based on my understanding of the project goals, and I would appreciate feedback to align it with volesti’s design practices.

Thank you for your time and feedback.

@vissarion vissarion requested a review from TolisChal March 12, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant