Conversation
FBumann
pushed a commit
that referenced
this pull request
Oct 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XjTvqu5LubaVCgWeKogCqj
Documentation build overview
39 files changed ·
|
This was referenced Oct 1, 2026
FBumann
added this pull request to stack #827
October 1, 2026 16:49
FBumann
removed this pull request from stack #827
October 2, 2026 09:05
… so a subproblem is a call on the whole model Each named variable becomes a parameter under the same name: binary and integer become int, continuous becomes float. Its bounds become the assumption <name>_within_bounds, and a constraint that named only fixed variables becomes an assumption. A masked variable with absence: undefined keeps its meaning: each read outside a sum is proven guarded, masked at its row, or refused with the reader named. Ported from #748 onto main, without its base (#746, #747). A given variable is refused with a message that names it as given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XjTvqu5LubaVCgWeKogCqj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XjTvqu5LubaVCgWeKogCqj
The second variable's rewrite read the row's where: from the spec, not from the rewrite in progress, so it replaced the mask the first one added. Every name is now checked before the first one is rewritten, and the rewrite reads only what it is writing. A binary whose bounds restate 0 and 1 writes each side of its assumption once. The how-to gives spec.fix as steps, with the call, its result and a refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XjTvqu5LubaVCgWeKogCqj
…o row is rewritten and no read is refused The parameter is `missing: absent` where the variable was masked and absent, `neutral` where it was neutral, and keeps the default `error` where the variable had no `where:`. Every read means what it meant, so the proof that a read stands under the mask, the mask added to a row's `where:`, and the refusal of a read in a case are gone. A read through a shift is still refused, by the language's rule on a shift over an expression with no variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiDTE4WvKobVxTDxUeWhc9
FBumann
force-pushed
the
claude/quirky-newton-fm9fev
branch
from
October 2, 2026 09:08
81b7c36 to
87af38e
Compare
FBumann
added this pull request to stack #832
October 2, 2026 09:11
…o claude/quirky-newton-fm9fev # Conflicts: # CHANGELOG.md
…ding, now called refused Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiDTE4WvKobVxTDxUeWhc9
…o claude/quirky-newton-fm9fev
…o claude/quirky-newton-fm9fev # Conflicts: # CHANGELOG.md
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.
What this changes
spec.fix(*names)turns each named variable into a parameter with the same name, and every expression goes on reading it. A Benders subproblem, a myopic step or a rolling window is then a call on the whole model, not a second file. The parameter takes the variable'smissing:, so no row changes. Closes #303.Stacked on #810, rebased onto its branch. GitHub moves the base to
mainwhen #810 merges. #826 is stacked on this PR.Rules, the stack, what moved, guards, gates, what was not done
The rewrite
binaryandintegerbecomeint, andcontinuousbecomesfloat. The description is kept.missing:. A masked variable that isabsentoutside its mask gives a parameter that ismissing: absent: a row that reads it there is still not built, and a sum has one summand fewer. Aneutralvariable gives aneutralparameter, which still reads0. A variable with nowhere:existed everywhere, so its parameter keeps the default,error.0and1, become the assumption<name>_within_bounds, under the variable'swhere:. Each side is written once.where:and description.spec.expand().fix(...)works.fix('a').fix('b')equalsfix('a', 'b').given: variables:is refused, and the message tells you to fix it on the merged spec.What the stack removed
Before #810, a parameter read
0where the variable had been absent, sofixhad to prove every read outside a sum was guarded, add the variable's mask to a row'swhere:, or refuse. Withmissing: absentevery read keeps its meaning, so these are gone:_unguarded_reads,_spreading_readsand_guards, and the mask added to a row'swhere:;fixing.pyis 147 lines, down from 250.A read through a
shiftis still refused, now by the language's rule on a shift over an expression with no variable (it needsedge=), when the fixed spec reloads. Whether that rule should let anabsentparameter through is a question forlimits.md, not this PR.Where the tests' coverage moved
test_an_unguarded_read_takes_the_mask_into_the_row,test_the_mask_joins_a_where_the_row_already_has,test_a_guarded_read_leaves_the_row_as_written,test_a_case_under_the_mask_is_guarded,test_a_read_the_mask_cannot_reach_is_refused[in-a-case…]test_every_read_keeps_its_meaning_and_no_row_changes, over five readers: pointwise, under another mask, under its own mask, inside a sum, in a casetest_a_read_the_mask_cannot_reach_is_refused[through-a-shift]test_a_read_through_a_shift_is_refused_by_the_languagetest_two_masks_added_to_one_row_are_both_kepttest_fixing_two_masked_variables_together_is_fixing_them_one_at_a_timetest_the_parameter_reads_a_missing_row_as_the_variable_read_its_mask:error,absent,neutraltest_the_pypsa_capacities_are_guarded_where_they_are_readtest_the_pypsa_capacities_are_fixed_without_changing_a_rowGuards
tests/test_fixing.pymissing:The guards for the rules that stayed (dtype, bounds written once, settled rows, set, curve, a name given twice, a given variable, a taken assumption name) were measured before the stack, and not re-measured.
Gates
On
87af38e, whose tree is the one tested before the rebase:pixi run lint: pass.pixi run test: 2692 passed.docs-build: the only warning ispathlib.Path, which needsdocs.python.org/3/objects.inv; the proxy here refuses it.compile-tex: not run. tectonic cannot download its bundle here. The diff changes no typeset output.The rebase replays the four commits onto #810, so the first three still read the old
variable.absence, and only the last one passes. Pushed with--force-with-lease, at your instruction, against the AGENTS.md rule.Not done
dual(c)of a constraint that becomes an assumption stops resolving. The reload names it.absenta missing row there is read as absence.Why
#303: a fix that a driver writes by hand is wrong in two ways, and nothing reports either. A masked variable reads
0where it did not exist, and a binary becomes a float. Two drivers would also each decide these rules differently.