Runner: run_solver.py update with xpress#362
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
siddharth-krishna
approved these changes
Feb 11, 2026
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.
The goal of this pull request is add support for the
xpresssolver in therun_solver.pyscript.run_solver.pyThe applied changes are:
def get_solver: I have added theseed_optionsforxpress, based on this documentation page and this documentation page.def def is_mip_problem: I have added an if branch forxpressto understand whether a given solver model is a MIP problem. I based this change on this documentation page and this documentation page.def get_reported_runtime: I have added an if branch forxpressto get the solver runtime. I based this change on this documentation page and this documentation page.def get_duality_gap: I have added an if branch forxpress. The change is based on this documentation page and this documentation page (for how to accessing controls).Test
I tested the changes to
run_solver.pyon the benchmark pypsa-eur-elec-trex-3-12h.lp.I get:
{"runtime": 1.298514694000005, "reported_runtime": 0.93, "status": "ok", "condition": "optimal", "objective": 7398190482.723573}The value of the objective function is compatible to those found here