Skip to content

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
pypsa-completefrom
docs/pypsa-efficiency-per-snapshot
Closed

FabianHofmann wants to merge 3 commits into
pypsa-completefrom
docs/pypsa-efficiency-per-snapshot

Conversation

@FabianHofmann

Copy link
Copy Markdown
Contributor

Prompt: "2" (start efficiencies per snapshot in a separate agent)

Note

The following content was generated by AI.

examples/pypsa.yaml reads 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 series in component_attrs.

  • Link efficiency* and Process rate*: 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 the shift, which reads it at departure. Link_output_arrival and Process_output_arrival now multiply the shifted flow.
  • StorageUnit efficiency_store, efficiency_dispatch: constraints.py:2081-2082, per snapshot.
  • StorageUnit and Store standing_loss: constraints.py:2080, :2259, per snapshot. Already stated per snapshot as {c}_retention; no change.
  • Transformer phase_shift: a fixed shift enters the cycle sum per snapshot (constraints.py:1657-1663). Transformer_phase_shift_weight spans snapshot. It stays without scenario, since PyPSA fails on a transformer in a cycle with scenarios (:1654).
  • Generator efficiency in primary_energy: global_constraints.py:418-423, per snapshot and per scenario. Generator_primary_energy_weight spans snapshot.
  • examples/pypsa_linearized_uc.yaml: Link_efficiency spans snapshot; it has no delay, so nothing else moves.

Triage. No language change. Each is a parameter gaining snapshot, and one factor moving outside a shift.

Rung 60 (rung_60_efficiency_per_snapshot.py), uniform generators weighting as rung 16. PyPSA solves to 130562.09. With each series held at its mean:

series at its mean objective
link efficiency 130774.59
process rate1 130622.09
efficiency_store 129770.09
efficiency_dispatch 129966.86
generator efficiency 131280.86
transformer phase_shift 130313.38

Read at departure (each series moved one snapshot later): link 130676.26, process 130742.09.

Collapse. tests/fixtures/pypsa_standard_shape.yaml changes: the six parameters gain snapshot. A plain run feeds the same value at every snapshot.

Gates. pixi run lint passed. pixi run test: 1851 passed. pixi run docs-build: no issues. pixi run compile-tex (from a clean build/tex): 27 documents. reference.py --check: every rung solves to its record. I did not run the full pixi run ci in one go.

Not done. Piecewise efficiencies and rates (static or piecewise or series) stay out; the file states no piecewise curve.

@read-the-docs-community

read-the-docs-community Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

…efficiency-per-snapshot

# Conflicts:
#	docs/examples/pypsa.md
#	examples/references/pypsa/references.json
@FBumann FBumann added the docs Documentation pages, guides, reference and README label Sep 25, 2026
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
@FabianHofmann

Copy link
Copy Markdown
Contributor Author

Prompt: "1" (close PR #717, since its content is on main)

Note

The following content was generated by AI.

Closing. This content reached main through #736, which carries this branch: Link_efficiency spans [scenario, snapshot, link_output] on fcb654da. The remaining PyPSA points are tracked in #783.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation pages, guides, reference and README

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants