You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prompt: "please explore how we can decompose the big pypsa yaml file into many small, topic related yaml files. And how we can test if everything works. I imagine that the merging of those yaml files must ultimatively result in the same spec. Start from #620. We should probably merge main into it. Then use the feature from 690. For testing, we might need 718"
Prompt: "Open an issue with your proposal and your findings about it."
Prompt: "I think we can be sure that we need to add parameters and expressions to given... Lets just do it as a stacked PR onto 690. Then retry. Iterate until the split is clean, reasonable and its easy to add new features via a fragment."
Note
The following content was generated by AI.
Two language changes make the split work: given: reads parameters and expressions (#728), and fragments add terms to one additive expression (#729). With both, #723 cuts pypsa.yaml into 24 fragments that merge back to its rows.
Note
The following content was generated by AI.
Two language changes make the split work:
given:reads parameters and expressions (#728), and fragments add terms to one additive expression (#729). With both, #723 cutspypsa.yamlinto 24 fragments that merge back to its rows.Plan
canonical --checkfails a model file that is not in the canonical form, and--writerewrites it #718.main: the fragments of chore: examples/pypsa/ cuts pypsa.yaml into 24 topic fragments that merge back to its rows #723 become the source underexamples/pypsa/,examples/pypsa.yamlgoes, and the gallery page,examples/symbols/pypsa.yaml,tests/test_pypsa_collapses.pyand the reference coverage check readmerge(examples/pypsa/*.yaml).tests/test_pypsa_split.pyof chore: examples/pypsa/ cuts pypsa.yaml into 24 topic fragments that merge back to its rows #723 moves with it; its row check compares against the one file once, in the migration PR, and is dropped after.Layout
A component is a family of files, and every system topic is one file:
generator,link,process, each with_commitment,_rampingand_maintenance;storage_unit,store,line,transformer,load.network(Bus_injection == 0) andpower_flow(Cycle_angle_sum == 0).cost(operating cost and CVaR),carrier,global_constraints,security.core: the shared weights.A new component is a new family. It adds its shares to the hubs, and no other file changes.
Findings, and what was tried first
given:as in feat(language): merge and override load every model they compose and return one #690 (variables and constraints only), 491 of 652 declarations must share one file.given:, the largest forced group is 18; with expressions too, 1.given:alone, the 14-file split merges back exactly. But each hub file lists every component, so a new component edits four other files.corecan be left out, and the rest merges into a whole model (checked intests/test_pypsa_split.py).given:also merges back, at 1100 copied lines. Rejected.mergejoins objectives and shares in fragment-name order, with brackets.canonical_dictdid not sort names undergiven:(feat(language): two files that mean the same model write one text #530 × feat(language): a file says what it reads, and fragments and patches compose into one model #571). Fixed on chore: examples/pypsa/ cuts pypsa.yaml into 24 topic fragments that merge back to its rows #723 with a regression test.