Repository navigation
docs(examples): a link's or a process's output port reads its owner and its bus from one relation - #892
Open
FabianHofmann wants to merge 2 commits into
Open
docs(examples): a link's or a process's output port reads its owner and its bus from one relation#892FabianHofmann wants to merge 2 commits into
FabianHofmann wants to merge 2 commits into
Conversation
…nd its bus from one relation Link_output_link and Link_output_bus fold into Link_output_connects, keyed by link_output with the values [link, bus]. Process_output_process and Process_output_bus fold into Process_output_connects in the same way. Each call names the column it reads, so the at() and sum() calls keep their meaning.
Documentation build overview
3 files changed± changelog/index.html± examples/pypsa/link/index.html± examples/pypsa/process/index.html |
brynpickering
left a comment
Contributor
There was a problem hiding this comment.
This is blocked by PyPSA/PyPSA#2015
This branch has not been deployed
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.
Each link output port and each process port reads its owner and its bus from one relation with two value columns.
Link_output_connectsandProcess_output_connectsreplace four relations, and every call names the column it reads.Method, gate output, alternatives
Change.
Link_output_link+Link_output_busbecomeLink_output_connects: {key: link_output, values: [link, bus]}.Process_output_process+Process_output_busbecomeProcess_output_connects: {key: process_output, values: [process, bus]}. Theat(..., by=X_connects[link])andsum(..., by=X_connects[bus])calls read one column each, so the model does not change. Files:examples/pypsa.yaml,examples/pypsa/{link,process}.yaml,tests/fixtures/pypsa_standard_shape.yaml, and the generateddocs/examples/pypsa.md,docs/examples/pypsa/{link,process}.md(regenerated withpixi run python -m tools.gallery). No other file insrc,tests,docs,toolsorexamplesnames the old relations.Data contract. The data for each relation is now one table
[link_output, link, bus](or[process_output, process, bus]), not two.missing:stays the default, as for the old pair: every output port has a row.Gates.
pixi run lintpasses.pixi run cipasses on7cc95157: 2916 passed, 1 skipped; docs build has no issues; 54 TeX documents compile.Not done, on purpose.
bus0stays a separate relation. It is not folded into the output ports.componentdimension.portdimension.These are open design choices. A sketch of the enumerated-connection pattern for all components exists outside the tree.