Skip to content

Runner: run_solver.py update with xpress#362

Merged
finozzifa merged 12 commits intomainfrom
add_xpress_support
Feb 11, 2026
Merged

Runner: run_solver.py update with xpress#362
finozzifa merged 12 commits intomainfrom
add_xpress_support

Conversation

@finozzifa
Copy link
Copy Markdown
Member

@finozzifa finozzifa commented Dec 19, 2025

The goal of this pull request is add support for the xpress solver in the run_solver.py script.

run_solver.py

The applied changes are:

  • def get_solver: I have added the seed_options for xpress, based on this documentation page and this documentation page.
  • def def is_mip_problem: I have added an if branch for xpress to 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 for xpress to 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 for xpress. 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.py on 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

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solver-benchmark Ready Ready Preview, Comment Feb 11, 2026 4:38pm

Request Review

Copy link
Copy Markdown
Contributor

@Vamsipriya22 Vamsipriya22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good overall 👍

However, the CI check is currently failing due to a URL validation error. That issue appears to already be addressed in PR #417.

I suggest merging PR #417 first; once that is in, the failing check here should disappear and this PR can be merged cleanly.

@finozzifa finozzifa merged commit 8ce23e8 into main Feb 11, 2026
5 checks passed
@finozzifa finozzifa deleted the add_xpress_support branch February 11, 2026 16:43
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.

3 participants