Apply seasonal line ratings to s_max_pu without modifying s_nom#1
Draft
MaykThewessen wants to merge 78 commits into
Draft
Apply seasonal line ratings to s_max_pu without modifying s_nom#1MaykThewessen wants to merge 78 commits into
MaykThewessen wants to merge 78 commits into
Conversation
Add params.consistency.numerical_tolerance option (default 1e-9) to suppress false warnings from floating-point rounding in three consistency check comparisons: static power attributes, time-series power limits, and generator energy sums. Simplify tests to four focused test cases.
Co-authored-by: Lukas Trippe <lkstrp@pm.me>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lukas Trippe <lkstrp@pm.me>
…_outages` (PyPSA#1637) Co-authored-by: lkstrp <lkstrp@pm.me>
PyPSA#1636) Co-authored-by: Lukas Trippe <lkstrp@pm.me>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: lkstrp <lkstrp@pm.me> Co-authored-by: Fabian Hofmann <fab.hof@gmx.de>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lukas Trippe <lkstrp@pm.me>
Co-authored-by: Lukas Trippe <lkstrp@pm.me>
…1662) Co-authored-by: lkstrp <lkstrp@pm.me>
Co-authored-by: xueyuan <xueyuan@tode.com>
…tore/Link/Process (PyPSA#1703) Co-authored-by: lkstrp <lkstrp@pm.me>
Co-authored-by: Fabian <fab.hof@gmx.de>
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
Co-authored-by: Lukas Trippe <lkstrp@pm.me>
…yPSA#1687) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian <fab.hof@gmx.de> Co-authored-by: lkstrp <lkstrp@pm.me>
…Frame kwarg crash (PyPSA#1682) Co-authored-by: Fabian Hofmann <fab.hof@gmx.de> Co-authored-by: lkstrp <lkstrp@pm.me>
Co-authored-by: Lukas Trippe <lkstrp@pm.me>
Address review feedback on the seasonal line ratings helper: the previous version set s_nom to the winter envelope in place and encoded the seasonal variation as a derived ratio. Per the reviewer, s_nom must not be changed by applying seasonal ratings. apply_seasonal_rating now treats the summer/winter columns as absolute MVA ratings (the form TSOs publish, e.g. JAO/Core flow-based domain files give a max permissible current per season and voltage level that together define an absolute MVA limit) and converts them into per-unit factors relative to the line's existing s_nom: s_max_pu = rating / s_nom per snapshot. s_nom is left untouched. - Validate that referenced lines have a strictly positive s_nom. - Compose with pre-existing static/dynamic s_max_pu (e.g. N-1 margins). - Rework tests around a fixture with parametrized season cases and rename to test_seasonal_line_ratings.py. - Simplify the docs page, clarify that inputs are absolute MVA and s_nom is preserved, and drop the out-of-scope section. - Add a release note and a nav entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L7Eusjq6Ao5w292RBzwtYH
5b4bc40 to
9bfd031
Compare
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.
Addresses the review feedback on PyPSA#1694.
What changed
The previous
Lines.apply_seasonal_ratingsets_nomto the winter envelope (max(summer, winter)) in place and encoded the seasonal variation as a derived ratio. The reviewer's key requirement was:The method now:
summer/wintercolumns as absolute MVA ratings — the form TSOs actually publish. The JAO / Core flow-based domain files state a maximum permissible current per season and voltage level, which together define an absolute MVA limit for a line. (This also answers the reviewer's question: TSOs report ratings in absolute capacity terms, not per-unit load factors.)s_nom:s_max_pu = rating(season) / s_nomper snapshot.s_nom. It stays the nominal rating the network was built with, so capacity/investment logic is unaffected.s_nom.s_max_pu(e.g. N-1 margins) viacompose=True.Other review items addressed
seasonal_networkfixture with parametrized season cases, and renamed totest_seasonal_line_ratings.py. Includes an explicittest_s_nom_never_changes_for_any_input.s_nomis preserved; dropped the "out of scope" section and trimmed the standards language.Verification
pytest test/test_seasonal_line_ratings.py→ 17 passed.ruff check/ruff format --checkclean.🤖 Generated with Claude Code
Generated by Claude Code