Skip to content

fix: call GLPK with --freemps instead of --mps #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Conversation

siddharth-krishna
Copy link
Collaborator

@siddharth-krishna siddharth-krishna commented Feb 4, 2025

Closes #402

Changes proposed in this Pull Request

GLPK solver is always called with the --freemps option instead of the --mps when using the Solver API to solve an external MPS file. --mps is for the older fixed-column MPS format that is rarely used nowadays. Almost all fixed MPS files can be parsed by the free MPS format.

As @odow says in #402:

Just always pass --freemps. Pretty much any fixed format MPS file should be parseable as freemps. The only issue might be if there are variable or column names with leading spaces. But JuMP would never write one, and I don't think Linopy would. And anyone that does is cursed.

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

@FabianHofmann FabianHofmann merged commit cf3df99 into master Feb 4, 2025
20 checks passed
@FabianHofmann FabianHofmann deleted the glpk-freemps branch February 4, 2025 06:58
siddharth-krishna added a commit to open-energy-transition/solver-benchmark that referenced this pull request Feb 14, 2025
Adds CBC solver as per #88 
Uses the new version of linopy that has
PyPSA/linopy#410 so this closes
#68
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.

GLPK always called with --mps, which is for fixed MPS format only
2 participants