docs(pypsa): the outage factors of a security-constrained run come from each investment period's own branches - #834
Open
FabianHofmann wants to merge 2 commits into
Open
FabianHofmann wants to merge 2 commits into
FabianHofmann wants to merge 2 commits into
Conversation
…om each investment period's own branches Line_BODF and Transformer_BODF span period; rung 68 records PyPSA/PyPSA#1971, an outage of a line that retires before the last period.
This branch has not been deployed
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.
Note
The following content was generated by AI.
Line_BODFandTransformer_BODFnow spanperiod: each period's outage factors come from its own active branches. Rung 68 records PyPSA/PyPSA#1971: intended13000.0, PyPSA8050.0. Part of #783.Method, gate output, what is not done
What changed
examples/pypsa.yaml:Line_BODFandTransformer_BODFspan[period, …, outage]. A row exists only where the branch and the outage are active in the period and share a sub-network of that period. The eight security blocks read the factor withat(…, by=snapshot_period, over=period, into=snapshot), in thewhereand in the expression, asLine_angle_sumreads the cycle weights since docs(pypsa): the cycle rows read each investment period's own cycle basis #814. No language work was needed.examples/pypsa/security.yamland the pages are regenerated.rung_68_outage_factors_per_period.py),ISSUE = 1971. Busesa,b; linesab68(both periods) andab_old68(build_year=2000,lifetime=25, so 2020 only), both rated60; outageab_old68. In 2020 its factor onab68is+1, so the import is at most60. PyPSA builds no security row and raises no error, imports up to120, and solves to8050.0. The network has no build to decide, so each period solves on its own. The oracle is the same network once per period (network([2020]),network([2030])): in a network of one period, the last period is that period, so PyPSA's factors are correct there. Oracle objectives7600.0+5400.0=13000.0.reference.pyis unchanged.docs/examples/pypsa.md: rung 30 says the factors spanperiod; its row "a branch not active in a period" now says the file builds no copy there; a new row "outage factors of a period other than the last" (diverges, rung 68). Rung 66's text and row: the file no longer builds the 2020 copies ofca66. It builds 6 of PyPSA's 12 rows per bound, not 10; PyPSA's other 2020 copies repeat a plain limit or are empty, so the feasible set is the same. New rung 68 section. New data-prep step: outage factors come from each period's active branches.PyPSA cites (02bdcbba)
abstract.py:443-460(one BODF per sub-network aftercreate_model, applied to all snapshots),constraints.py:1641(last topology call is the last period's cycle loop),networks.py:1278-1281(an inactive branch loses itssub_network).Gates
pixi run python -m tools.pypsa_split split examples/pypsa,check: 24/24 fragments load alone, one canonical form.pixi run python -m tools.gallery: regenerateddocs/examples/pypsa.md,docs/examples/pypsa/security.md.uv run --script examples/references/pypsa/reference.py: onlyrung_68_outage_factors_per_periodis new inreferences.json; every other record is unchanged.--check: "every rung solves to its record".pixi run lint: pass.pixi run ci: exit 0, 2659 passed, docs-build and compile-tex done.Not run, not done