Derive the candidate-line Big-M from the nodal angle bound - #166
Merged
Conversation
The angle side of the candidate-line Big-M was a literal pi, and the nodal angle bound a few lines below is pi/2. The angle difference across a line is bounded by twice the nodal bound, so the two are related but nothing enforces it: changing pMaxTheta leaves the Big-M unchanged and no longer valid. The bound is now named once and the Big-M derived from it. 2.0 * (pi/2) is bit-identical to pi in IEEE-754, so no result changes.
erikfilias
force-pushed
the
fix/bigm-angle-coupling
branch
from
August 29, 2026 21:31
919c580 to
e03837c
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.
Change
The angle side of the candidate-line Big-M is a literal
pi:and the nodal angle bound, a few lines below in the same function, is
pi/2:The angle difference across a line is bounded by twice the nodal bound, so
piis valid only whilethe nodal bound is
pi/2. Nothing ties the two together. This names the bound once and derives theBig-M from it.
Effect
None on results.
2.0 * (math.pi/2)is bit-identical tomath.piin IEEE-754, so the Big-M isunchanged for every line. No interface or input-data change.
Changing
pMaxThetacurrently leaves the Big-M at its old value, which is then too small for thewider angle range and restricts flows on candidate lines without raising an error. After this
change the two move together.
Scope
Making
pMaxThetaconfigurable is not included. If added later,oT_Data_Parameterwould be thenatural place, and two things would need handling: a
MaxThetacolumn there is read by the genericparameter loader and then overwritten by the broadcast assignment in
openTEPES_DataConfiguration.py, and the near-binding warning inopenTEPES_OutputResultsNetwork.pyhardcodes
math.pi / 2.