docs(pypsa): an efficiency, a rate or a phase shift may change from snapshot to snapshot - #717
Closed
FabianHofmann wants to merge 3 commits into
Closed
FabianHofmann wants to merge 3 commits into
FabianHofmann wants to merge 3 commits into
Conversation
…napshot to snapshot
FabianHofmann
requested review from
FBumann and
brynpickering
as code owners
September 25, 2026 11:31
…efficiency-per-snapshot # Conflicts: # docs/examples/pypsa.md # examples/references/pypsa/references.json
FBumann
pushed a commit
that referenced
this pull request
Sep 28, 2026
#740 gives each of the nine sums one owning fragment, names the terms in `pypsa.yaml`, simplifies the splitter and adds a page per fragment. The language, typesetter and their tests keep main's side, which holds #742 and #759 as merged. The PyPSA files take #740's side, the splitter writes `empty: true` on each owner block, and the fragments and pages are regenerated from `pypsa.yaml`, which keeps #717's per-snapshot coefficients. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CQxVP5uX2V4rpvJNPhbyR2
15 of 44 tasks
Contributor
Author
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.
examples/pypsa.yamlreads a link's efficiency, a process's rate, a storage unit's two efficiencies, a generator's primary-energy efficiency and a fixed phase shift per snapshot, as PyPSA 1.3.0 does. A delayed port reads its coefficient at arrival. Rung 60 shows each binds.Method, gate output, alternatives
PyPSA 1.3.0, as tagged. All six are
static or seriesincomponent_attrs.efficiency*and Processrate*: the balance takes the coefficient per snapshot (constraints.py:1234-1236), shifts the flow by the delay (:1518) and multiplies it by the coefficient after (:1521-1522). So a delayed port reads the coefficient at the arrival snapshot. The file had the product inside theshift, which reads it at departure.Link_output_arrivalandProcess_output_arrivalnow multiply the shifted flow.efficiency_store,efficiency_dispatch:constraints.py:2081-2082, per snapshot.standing_loss:constraints.py:2080,:2259, per snapshot. Already stated per snapshot as{c}_retention; no change.phase_shift: a fixed shift enters the cycle sum per snapshot (constraints.py:1657-1663).Transformer_phase_shift_weightspanssnapshot. It stays withoutscenario, since PyPSA fails on a transformer in a cycle with scenarios (:1654).efficiencyinprimary_energy:global_constraints.py:418-423, per snapshot and per scenario.Generator_primary_energy_weightspanssnapshot.examples/pypsa_linearized_uc.yaml:Link_efficiencyspanssnapshot; it has no delay, so nothing else moves.Triage. No language change. Each is a parameter gaining
snapshot, and one factor moving outside ashift.Rung 60 (
rung_60_efficiency_per_snapshot.py), uniformgeneratorsweighting as rung 16. PyPSA solves to130562.09. With each series held at its mean:efficiencyrate1efficiency_storeefficiency_dispatchefficiencyphase_shiftRead at departure (each series moved one snapshot later): link 130676.26, process 130742.09.
Collapse.
tests/fixtures/pypsa_standard_shape.yamlchanges: the six parameters gainsnapshot. A plain run feeds the same value at every snapshot.Gates.
pixi run lintpassed.pixi run test: 1851 passed.pixi run docs-build: no issues.pixi run compile-tex(from a cleanbuild/tex): 27 documents.reference.py --check: every rung solves to its record. I did not run the fullpixi run ciin one go.Not done. Piecewise efficiencies and rates (
static or piecewise or series) stay out; the file states no piecewise curve.