docs: a link's delivery lags its flow, wrapping or losing what is in transit at the horizon's edge - #300
Merged
Conversation
…transit at the horizon's edge Rung 16 states PyPSA's link `delay` and `cyclic_delay` in the parity gallery: a port's delivery is shift(…, offset=Link_output_delay, edge=…), and a cases: block on Link_output_cyclic_delay chooses edge='wrap' (cyclic) or edge=0 (lost). The language already had cases: (#168) and shift; nothing in src/ or the schema changes — this is a new example closing a parity row, so it documents rather than adds. Supersedes #75; the weighted-duration case is #299. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jk5LAMCoiD39q4Xz4AMVw
FBumann
force-pushed
the
feat/link-delay
branch
from
August 31, 2026 17:39
73bd75f to
dee5a9a
Compare
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.
Link delay is now stated on the ladder. A port's delivery is
shift(…, offset=Link_output_delay, edge=…), and acases:block onLink_output_cyclic_delaypicksedge='wrap'(cyclic) oredge=0(lost). Closes #75; the weighted case is #299.Why #75 closes rather than ships
#75 asked for
edge=<parameter>— a per-link number. Butwrapis a quoted keyword, never a value, so a parameter could never have carried the wrap/lose choice. That choice is a branch, and the shippedcases:(#168) carries it. So #75 is superseded, not implemented.The uniform-weighting boundary (a decision to flag)
PyPSA measures
delayas a duration insnapshot_weightings.generatorsunits and resolves it through cumulative time. A positionalshift(offset=n)reproduces that only when that column is uniform — which is why rung 16 is the one rung with a uniformgeneratorscolumn (objective/storesstay non-uniform, so no cost or storage factor passes as identity). Under a non-uniform column PyPSA resamples per snapshot — a shift that varies along the axis it translates, which the language refuses. That residual is filed as #299, and the rung prose says so plainly.Verification
pixi run ci— 904 passed,mkdocs build --strict,compile-texcompiled all 27 documents (the new\overrightarrow{f}arrival renders and compiles in LaTeX).reference.py --check— every rung solves to its record; onlyrung_16added (objective5262.5, 52 rows), no existing rung's numbers moved.uv; thedelay=2cyclic pipe serves all load from the cheap source, thedelay=1non-cyclic pipe drops the first snapshot to expensive backup — bothcases:arms exercised, and the two links differ in bothdelay(the offset parameter) andcyclic_delay(the branch)._Multiport._delay_positionsin pypsa 1.3.0 and checked position-for-position under uniform and non-uniform weightings.Deliberately not done / departed defaults
generatorsweighting is non-uniform by design — it cannot host a positional delay. Rung 9 is narrowed to "multi-link"; itsdelayrow moves to rung 16.Link_output_arrivalis symbolized (\overrightarrow{f}) and not expanded on the page, exactly asStorageUnit_charge_carried_inis — itscases:body lives inexamples/pypsa.yaml.