Repository navigation
Conversation
marcomangano
left a comment
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"]) |
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
There was a problem hiding this comment.
Expanded comments. Yes you are exactly correct
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. 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:
|
f558122 to
03001b8
Compare
|
@sabakhshi @sanjan98 can one of you review this PR? |
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