Repository navigation
Conversation
marcomangano
left a comment
Collaborator
There was a problem hiding this comment.
Is the NLPQLP test failure a matter of convergence?
Also, see my comment below
| lower.extend(econ["value"]) | ||
| upper.extend(econ["value"]) | ||
| lower.extend([-INFINITY] * len(econ["fact"])) | ||
| upper.extend(-econ["value"]) |
Collaborator
There was a problem hiding this comment.
Took me a second to figure the math out because I missed the change in sign of the factor. Should we add a short comment to explain? If I get this right:
a=b -> a<=b && a>=b -> a<=b && -a=<-b
Collaborator
Author
There was a problem hiding this comment.
Expanded comments. Yes you are exactly correct
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #494 +/- ##
==========================================
- Coverage 54.22% 51.04% -3.18%
==========================================
Files 1 1
Lines 225 239 +14
==========================================
Hits 122 122
- Misses 103 117 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ewu63
force-pushed
the
fix/getordering-nonlinear-equality-expansion
branch
from
September 26, 2026 23:28
f558122 to
03001b8
Compare
marcomangano
approved these changes
Sep 28, 2026
Collaborator
Author
|
@sabakhshi @sanjan98 can one of you review this PR? |
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.
Purpose
There was a bug in the code that converts a single two-sided constraint to two one-sided constraints, for optimizers that cannot handle two-sided constraints directly (CONMIN, Egor, NSGA2). This meant that for these optimizers, optimization problems with nonlinear equality constraints where the constraint value is not zero could result in erroneous optimization solution. This was reproduced on the hs060 problem (added here) with Egor, where without the bugfix the solution was reported as [0.35, 0.34, 0.35] instead of [1, 1, 1].
Expected time until merged
A few days.
Type of change
Testing
Added unit and regression tests.
Checklist
ruff checkandruff formatto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable