Repository navigation
docs(pypsa): a PyPSA schedule, weight or limit that the data leaves out is absent rather than zero, and a committable extendable unit is assumed to have its big-M - #912
Merged
Conversation
…ut is absent rather than zero Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A2crTbivTGt2WzGpTebdmf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A2crTbivTGt2WzGpTebdmf
FBumann
added this pull request to stack #913
October 20, 2026 15:32
Documentation build overview
33 files changed ·
|
The big-M assumptions print their condition's indices sorted by name, as #911 prints every derived frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2S9sN1jLGGMCCwqwVyGD6
Merged
brynpickering
requested review from
FabianHofmann
and removed request for
brynpickering
October 21, 2026 11:48
FabianHofmann
approved these changes
Oct 21, 2026
FabianHofmann
left a comment
Contributor
There was a problem hiding this comment.
good catch @FBumann
FBumann
removed this pull request from stack #913
October 22, 2026 09:17
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.
Of the 73 PyPSA parameters that declare
missing:, 61 change from0toabsent. For each of them, every reading gives the same rows either way. Four keep0, eight keep their reading, and none needs1. Stacked on #894.The judgement, by how the files read each parameter
0andabsent*_setschedules and builds (Generator_p_set,Line_s_nom_set,StorageUnit_state_of_charge_set, …)where:of the row that fixes the value, and that row's right sidewhere:is false at a missing row under both, and a real0.0is a row under both, so the rows are the same, and the missing value is never readabsent*_primary_energy_weight,*_operational_limit_weight,*_tech_capacity_weight,*_volume_weight,*_expansion_cost_weight) and the 5 cycle and outage weights (Line_cycle_weight,Transformer_cycle_weight,Transformer_phase_shift_weight, the two*_BODF)sum, or a coefficient under awhere:that names itabsentdrops the summand and keeps the row;0keeps a term with no coefficient, which specsolve does not buildabsentLine_v_ang_max,Transformer_v_ang_max,Carrier_max_growth("no value means no limit")where:or awhen:, and a value under itabsent*_maintenance_durationwhere: *_maintainableabsentCVaR_alpha1 - CVaR_alpha, underwhere: CVaR_omegaCVaR_omegaabsent*_big_mcom-extrows, underwhere: *_com_ext0would forcep <= 0at a missing row, andabsentwould drop the row. Neither is right: data prep writes one for each committable, extendable unit (get_committable_big_m_values)absent, with an assumptionholds: *_big_mwhere*_com_ext*_p_initstatus_initial * p_init, the output carried into the first snapshot0 * p_init, andabsentwould drop that row. PyPSA's defaultp_initis00CVaR_omega(1 - CVaR_omega) * … + CVaR_omega * CVaRabsentwould drop that expression wherever no risk preference is set.0is risk-neutral, PyPSA's default0GlobalConstraint_counts_snapshotboolflagfalseis a snapshot the row does not countfalse*_nom_mod0is refused at load as a divisorabsent, as in #894No parameter here takes
1. The values a PyPSA default of1would fill, such asefficiencyandp_max_pu, declare nomissing:. They stayrefused, because data prep writes PyPSA's default into every row.Verification
Method. A script listed every place a fragment reads each of the 73 parameters: the entry, the field and the text. I judged each parameter against the table "What a missing row reads as" in
absence.md, from the position of each reading. Then a second script rewrote the 61missing: 0lines, in the fragments and inexamples/pypsa.yamlalike.Gates on
6c6afb9, which merges #894's head2d7355f, and somainwith #898, #899, #900, #901, #904, #907, #909 and #911:pixi run lintpasses.pixi run testpasses: 3077 passed, 1 skipped.test_the_fragments_merge_to_the_one_fileholds, so the fragments and the one file agree.pixi run docs-buildpasses.compile-texwas not run, because the container cannot download the TeX bundle. CI runs it.pypsa.mdand the three*_commitment.mdpages. In those, the big-M assumptions print their condition's indices sorted by name, as fix(language): two files that declare their dimensions in different orders load to the same program #911 prints every derived frame.Not checked. I did not build the PyPSA ladder in specsolve with this mathspec, because specsolve pins a mathspec release. The claim that the rows stay the same rests on the table in
absence.md, and on specsolve already keeping amissing: 0table sparse.Not done
efficiency,p_max_puand the other parameters with a PyPSA default stayrefused, which brynpickering's review on feat(language)!: a missing row reads as the value the file names, andmissing: neutralis gone #894 asks about.🤖 Generated with Claude Code
https://claude.ai/code/session_01A2crTbivTGt2WzGpTebdmf