cutout: improve layout calculation from capacity list#483
Merged
FabianHofmann merged 4 commits intoPyPSA:masterfrom Mar 13, 2026
Merged
cutout: improve layout calculation from capacity list#483FabianHofmann merged 4 commits intoPyPSA:masterfrom
FabianHofmann merged 4 commits intoPyPSA:masterfrom
Conversation
5bd0b23 to
7c71682
Compare
Contributor
FabianHofmann
left a comment
There was a problem hiding this comment.
wonderful, could you add a short release note?
0bcdbeb to
1b43c6b
Compare
Contributor
Author
|
Sure - should be ready. |
1b43c6b to
b4d66c4
Compare
fixes a performance issue where xarray searches all combinations instead of using monotony of x and y values
fa4a689 to
6ead01a
Compare
for more information, see https://pre-commit.ci
5 tasks
FabianHofmann
approved these changes
Mar 13, 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.
Closes #479
Changes proposed in this Pull Request
fixes a performance issue where xarray searches all combinations instead of using monotony of x and y values.
Instead of trying all x/y pairs for all 1126727 in a row - which consumes more than 512GB RAM and fails after an hour - the small numpy solution solves this in 0.1s.
I verified this for different datasets and capacities.
Checklist
doc.environment.yaml,environment_docs.yamlandsetup.py(if applicable).doc/release_notes.rstof the upcoming release is included.