Skip to content

Support indicator, SOS and semi-continuous constraints in SCIP - #936

Open
mcoughlin wants to merge 4 commits into
PyPSA:masterfrom
mcoughlin:finish-scip
Open

mcoughlin wants to merge 4 commits into
PyPSA:masterfrom
mcoughlin:finish-scip

Conversation

@mcoughlin

@mcoughlin mcoughlin commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

SCIP was already reading indicator constraints, SOS constraints and semi-continuous variables; now it actually uses them.

Note

Code was checked by AI (Claude Code).

Changes proposed in this Pull Request

Plugs in SCIP indicator constraints, SOS constraints and semi-continuous variables such that they are used in the solver.

Checklist

  • AI-generated content is marked (see AGENTS.md).
  • 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.

@codspeed

codspeed Bot commented Sep 7, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.52%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 179 untouched benchmarks
⏩ 181 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_to_lp[merge_balance-severity=0] 2.7 MB 3.3 MB -18.74%
test_to_lp[nodal_balance_sparse-severity=100] 3.9 MB 3.4 MB +14.54%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mcoughlin:finish-scip (ccc9f5c) with master (0770dfe)

Open in CodSpeed

Footnotes

  1. 181 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Replace the SCIP-internal aux denylist (prefixes + constraint handlers)
with an allowlist matching linopy's own x<label>/c<label> names.

@FabianHofmann FabianHofmann left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks @mcoughlin ; added a small change on how to reference optimization vars/cons.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants