Skip to content

fix: ramp limit contstraints failing because of mismatched index#1537

Merged
lkstrp merged 3 commits intoPyPSA:masterfrom
lkstrp:fix-1517
Jan 26, 2026
Merged

fix: ramp limit contstraints failing because of mismatched index#1537
lkstrp merged 3 commits intoPyPSA:masterfrom
lkstrp:fix-1517

Conversation

@lkstrp
Copy link
Copy Markdown
Member

@lkstrp lkstrp commented Jan 23, 2026

Closes #1517

Checklist

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

@lkstrp lkstrp requested a review from Irieo January 23, 2026 07:58
Copy link
Copy Markdown
Contributor

@Irieo Irieo left a comment

Choose a reason for hiding this comment

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

This fixes the problem, and much cleaner implementation.
I am surprised we were missing this simple test for combination of multi-period investments + ramp limits.
I've looked through the rest of constraints code, this was the only place with the problematic .reindex() pattern.

@nnormanbates
Copy link
Copy Markdown

This change works for me as well. Thank you for the continued support.

@nnormanbates
Copy link
Copy Markdown

Hi, I manually applied these changes to my code, and it worked. Just now waiting for the checks to be completed so that I can request others to merge with this latest release.

@lkstrp lkstrp enabled auto-merge (squash) January 26, 2026 14:40
@lkstrp lkstrp merged commit f0ebfaa into PyPSA:master Jan 26, 2026
24 of 26 checks passed
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.

Bug in multi horizon when extendable generator has a defined ramp_limit

3 participants