Skip to content

feat: add pyoptinterface io_api - #597

Closed
coroa wants to merge 17 commits into
PyPSA:masterfrom
coroa:feat/pyointerface
Closed

feat: add pyoptinterface io_api#597
coroa wants to merge 17 commits into
PyPSA:masterfrom
coroa:feat/pyointerface

Conversation

@coroa

@coroacoroa commented Feb 28, 2026

Copy link
Copy Markdown
Member

Changes proposed in this Pull Request

Adds an alternative io_api="poi" option, which uses pyoptinterface to communicate the optimisation problem directly to the solvers.

Initial testing is quite promising for gurobi, comparable speed on large instances, faster on small ones (for highs the effects are limited).

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.

@coroa
coroaforce-pushed the feat/pyointerface branch from aed9652 to abd3badCompareMarch 1, 2026 01:23
@metab0t

Copy link
Copy Markdown

For highs, you can also use set_raw_parameter: https://github.com/metab0t/PyOptInterface/blob/b3e1f455885de5734f42ccdfbd70827b638110fb/src/pyoptinterface/_src/highs.py#L419

@coroa
coroa marked this pull request as draft March 18, 2026 13:29
@coroa

Copy link
Copy Markdown
MemberAuthor

POI is slower than lp-polars on large instances and slower than direct on small instances and selective in-place model updates are slow too. So, we'll most likely close this PR and focus on improving the direct models instead.

@FabianHofmann

Copy link
Copy Markdown
Collaborator

closing this by #630

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@coroa@metab0t@FabianHofmann@FBumann