Add initial LP benchmark importer for converting LP problems to volesti H-polytopes#467
Open
ChinmayRout9040895625 wants to merge 1 commit intoGeomScale:developfrom
Open
Conversation
… to volesti H-polytopes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
'include/volesti/io/lp_importer.h'
(dataset → conversion → polytope construction)
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:
A.rows() == b.size())These checks help detect malformed inputs before constructing the polytope.
Example Workflow
The included example demonstrates:
Future Extensions
This implementation is intentionally minimal and can be extended to support:
Testing
Request for Feedback
I would appreciate guidance on:
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.