-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track nonlinear resultant vars outside of MOI #590
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #590 +/- ##
==========================================
+ Coverage 92.16% 92.24% +0.07%
==========================================
Files 6 6
Lines 2630 2642 +12
==========================================
+ Hits 2424 2437 +13
+ Misses 206 205 -1 ☔ View full report in Codecov by Sentry. |
This resolves all the tests to do with querying user-visible variables. |
r"^test_nonlinear_expression_hs109$", | ||
r"^test_nonlinear_expression_hs110$", | ||
# MOI.get(MOI.ObjectiveValue()) fails for NL objectives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at this. It's probably on our end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy if you're happy
Keep the coverage gods happy
I'm happy if @torressa is happy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Thanks Simon
Alternative to #587: instead of filtering out the NL resultant variables when querying through MOI, don't add these variables to MOI at all so they don't show up in model queries.
_update_if_necessary
, the same index tracking trick applied to each entry in model.variable_info is applied to NL constraints as well, so that their resvar indices are appropriately adjusted following deletion of another variable.