fix: assign duals back to stochastic network#1498
Merged
lkstrp merged 2 commits intoPyPSA:masterfrom Dec 18, 2025
Merged
Conversation
fneum
approved these changes
Dec 17, 2025
Member
|
The sparsity structure of linopy did not improve, since that is a fundamental xarray issue. A multidimensional constraint always needs space for the highest number of terms (ie strongly meshed buses have many terms, weakly meshed buses have considerably less terms). Rewriting to pyoframe would help :). But that opens another bag of worms. |
Irieo
approved these changes
Dec 18, 2025
Contributor
Irieo
left a comment
There was a problem hiding this comment.
This fixes the problem described in issue.
Unrelated to the issue, related to this example: assign_all_duals = True yields our own not implemented flag wrt writing duals for constraints w/o a dedicated place in data structure. This brings us back to this discussion #1474 (comment)
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 #1472
Closes #1491
Changes proposed in this Pull Request
A simple to fix but hard to find bug. Writing back duals when stochastic dimension existed, did not work for the branch of having strongly and simply meshed buses in one network. They are assigned differently in that case. The question is if this is still needed.
Checklist
docs.docs/release-notes.mdof the upcoming release is included.