docs(pypsa): a line or transformer limits its voltage angle difference, as in pypsa master - #808
Merged
Merged
Conversation
…e commitment rows, as in pypsa master
# Conflicts: # CHANGELOG.md
…e, as in pypsa master Line-v_ang-*, Transformer-v_ang-* and Transformer-v_ang-var-* over v_ang_max and x_pu_eff, with rung 61 recorded against PyPSA 02bdcbba.
Documentation build overview
22 files changed ·
|
# Conflicts: # CHANGELOG.md
# Conflicts: # docs/examples/pypsa/index.md
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
…ocs/pypsa-voltage-angle
FabianHofmann
force-pushed
the
docs/pypsa-fixed-modular
branch
from
October 2, 2026 09:06
df7f835 to
34af2a0
Compare
# Conflicts: # CHANGELOG.md # docs/examples/pypsa.md # docs/examples/pypsa/line.md # docs/examples/pypsa/link.md # docs/examples/pypsa/transformer.md # examples/pypsa.yaml # examples/pypsa/transformer.yaml
FBumann
pushed a commit
that referenced
this pull request
Oct 2, 2026
…tum8xc #808 and #815 add six sparse tables, marked missing: neutral: Line_v_ang_max and Transformer_v_ang_max (no row by default), and the module sizes of a storage unit, a store, a line and a transformer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiDTE4WvKobVxTDxUeWhc9
15 of 44 tasks
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.
pypsa.yamlstates PyPSA master's six voltage angle rows (PyPSA#1910) over newv_ang_max,x_pu_effand fixed-shift parameters. Rung 61 binds a line cap, a fixed-shift and a decided-shift transformer cap.Part of #783 (step 3a, "Voltage angle limits"). Stacks on #787 and #786; base
docs/pypsa-fixed-modular.Method, gate output, alternatives
PyPSA read.
constraints.py:1680-1782on02bdcbba, called atoptimize.py:882.v_ang_max, inc.active_assets, rows masked by per-snapshotactive. Lines only wherecarrier == "AC"; transformers have no carrier filter.cap = deg2rad(v_ang_max) / x_pu_eff. Line:s >= -cap,s <= cap.phase_shift_min >= phase_shift_max):offset = deg2rad(phase_shift) / x_pu_eff, withphase_shiftper snapshot;s >= -cap - offset,s <= cap - offset.s + Transformer-phase_shift * deg2rad / x_pu_effin[-cap, cap]; the variable is in degrees.v_ang_minfinite:DeprecationWarning, ignored.Triage against
docs/about/limits.md: no new construct. The rows are linear in existing operators;deg2radis the literal3.141592653589793 / 180.limits.mddoes not move.File.
Line_v_ang_max,Line_x_pu_eff[scenario, line];Transformer_v_ang_max,Transformer_x_pu_eff[scenario, transformer], ass_nom.Transformer_phase_shift_fixed[snapshot, transformer], without scenario, as the other shift parameters; theTransformer_phase_shift_varyingdescription now says the angle rows read them too. The variableTransformer_phase_shiftholds the name, so the fixed shift is_fixed. RowsLine_v_ang_lower/upper(withLine_carrier == 'AC'in thewhere),Transformer_v_ang_lower/upper,Transformer_v_ang_var_lower/upper, in PyPSA's divided form, placed after the*_s_setrows. Symbols inexamples/symbols/pypsa.yaml. Fragments and gallery pages regenerated.Rung 61. Spine plus a radial line beside the link (cap 1°), a triangle with a fixed 2° shift (transformer cap 2.5°) and a triangle with a decided shift (cap 5°). In one cycle the angle caps couple, so each triangle carries one cap. PyPSA solves to
121834.62; with each cap removed: line121161.89, fixed-shift transformer35214.37, decided-shift transformer111382.98, all three24090.0. Duals onLine-v_ang-upper,Transformer-v_ang-lowerandTransformer-v_ang-var-lowerare nonzero.Scenarios. With scenarios PyPSA builds no angle row and raises nothing (the #783 note, comment on PyPSA#1951). The rung has no scenario on purpose. The file states the rows per scenario; the docs table marks that case
diverges, with no rung recording it.Failing first. With the rung recorded and the file unchanged,
tests/test_pypsa_references.py::test_pypsa_builds_no_row_the_files_do_not_declarefailed:pypsa builds these and the files declare nothing that stands for them: ['Line-v_ang-lower', 'Line-v_ang-upper', 'Transformer-v_ang-lower', 'Transformer-v_ang-upper', 'Transformer-v_ang-var-lower', 'Transformer-v_ang-var-upper']. It passes after.Cite. The
KeyErrorof a transformer cycle with scenarios is raised atconstraints.py:1660(tr.static.loc[...]) on02bdcbba, not at:1654(theif "Transformer" intest), so the merge of main cites:1660inTransformer_phase_shift_varyingand in rung 55's prose.Gates.
pixi run lintpassed.pixi run cipassed (2626 tests).uv run --script examples/references/pypsa/reference.py --check: every rung solves to its record. Re-recording changed only therung_61entry.Not done. No engine solves the file against rung 61 here. No rung records the scenario divergence.
v_ang_minhas no parameter. No new data-prep note forx_pu_effbeyond the parameter descriptions. Nothing ticked in #783.Departure. Commits carry no
Co-Authored-By, per the user's global instruction.