Skip to content

docs(examples): the PyPSA file states a constraint once where PyPSA builds one row set, rather than a block per regime - #292

Merged
FBumann merged 1 commit into
mainfrom
feat/pypsa-cases-onto-main
Aug 31, 2026
Merged

FBumann merged 1 commit into
mainfrom
feat/pypsa-cases-onto-main

Conversation

@FBumann

@FBumann FBumann commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Prompt: "I now merged 257!" — then, on finding it had not reached main:
"Fix that! Reopen onto main!"

Note

The following content was generated by AI.

This is #257's diff, unchanged, onto main.
git cherry-pick of its merge commit 5233263 applies clean — six files, examples/
and docs/ only, no src/ — and the original authorship is preserved.

#257 was stacked on feat/cases-proved-apart, the branch carrying #168. #168 merged
to main on its own, which left that branch with no route there; merging #257 into it
put the port on an orphaned base. main still has zero cases: in
examples/pypsa.yaml, so no release can carry the port and v0.0.0-alpha.52 cannot be
cut. Nothing is wrong with the change — only with where it landed.

The branch it merged into is now 2 ahead / 5 behind main; it can be deleted once this
lands.

What it is, unchanged from #257

Twelve PyPSA names — sixteen counted once per file — were stated by two to four blocks
apiece, split by a regime the language could not name inside a quantity. Each is now one
block.

pypsa.yaml pypsa_linearized_uc.yaml
constraint blocks 116 → 98 25 → 21
names stated by more than one block 17 → 5 4 → 0

The five that remain are the GlobalConstraint sense-splits, where the split is in the
operator rather than in a value — #239, closed not planned, and untouched here.

Verified on this base

  • pixi run ci green on main + this commit: lint, 899 tests, mkdocs build --strict, 27 compiled documents. Tree clean after the run.

  • The downstream ladder was run against this branch, which is the check docs(examples): the PyPSA file states a constraint once where PyPSA builds one row set, rather than a block per regime #257's own
    symbolic argument could not make — lpspec's differential/pypsa/parity.py builds each
    rung through both engines and compares against live PyPSA 1.3.0. Rung 2 collapses
    exactly as intended
    : StorageUnit-energy_balance and Store-energy_balance go from
    two recorded structure deviations to none, at an unchanged objective and unchanged
    row, column and dual counts.

    before   rung_02_storage: MATCH · 2 of 26 names differ · duals on 103 rows, 2 negated · 25 equal · 2 region
    after    rung_02_storage: MATCH · 103 rows, 48 columns  · duals on 103 rows, 2 negated · 27 equal · 0 region
    

    Rungs 3 and up are not yet confirmed through that runner: lpspec's rung
    projection — a presentation device that cuts the file down to what each rung builds
    — does not understand cases: yet, and its first cut mis-handles a region whose
    when: is negated. That is a consumer-side gap, filed as work on the lpspec side; it
    says nothing about this diff, and pixi run ci here does not depend on it.

Not done here

…uilds one row set, rather than a block per regime (#257)

Sixteen PyPSA names were stated by two to four blocks apiece, split by a
regime the language had no way to name: the first snapshot a shift vacates,
a cyclic store, an extendable build, a committed unit. `cases:` names the
regime in the quantity instead, so each name is one block again.


Claude-Session: https://claude.ai/code/session_01N8skeF7J54HymyTZayV3Ug
(cherry picked from commit 88ce831)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@FBumann
FBumann requested a review from brynpickering as a code owner August 31, 2026 14:39
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 math-spec | 🛠️ Build #34313621 | 📁 Comparing f6c6166 against latest (40a0503)

  🔍 Preview build  

2 files changed
± examples/pypsa/index.html
± examples/pypsa_linearized_uc/index.html

@FBumann
FBumann merged commit c35e637 into main Aug 31, 2026
5 checks passed
@FBumann
FBumann deleted the feat/pypsa-cases-onto-main branch September 9, 2026 06:45
@FBumann FBumann added the docs Documentation pages, guides, reference and README label Sep 24, 2026 — with Claude
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.

1 participant