Skip to content
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

Fix legacy NLP interface #340

Merged
merged 7 commits into from
May 1, 2024
Merged

Fix legacy NLP interface #340

merged 7 commits into from
May 1, 2024

Conversation

pulsipher
Copy link
Collaborator

@pulsipher pulsipher commented May 1, 2024

This fixes a bug in the legacy NLP interface that is triggered when a nonlinear measure is in an affine/quadratic expression. Previously, this caused an error in the JuMP interface so InfiniteOpt used a try-catch hack to deal with detecting this case. Now with GenericNonlinearExpr JuMP no longer errors and actually allows mixing of NonlinearExpression and GenericNonlinearExpr (see jump-dev/JuMP.jl#3740).

This PR fixes this bug and makes v0.5 version of InfiniteOpt work with JuMP's legacy interface.

Please note that the current master branch of InfiniteOpt uses JuMP's new nonlinear API and is more performant and less hacky. It will be released with v0.6 once a few more breaking changes are finalized.

@pulsipher pulsipher added the bug Something isn't working label May 1, 2024
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.74%. Comparing base (0961b36) to head (3f84083).

Additional details and impacted files
@@               Coverage Diff               @@
##           release-0.5     #340      +/-   ##
===============================================
- Coverage        99.77%   99.74%   -0.03%     
===============================================
  Files               36       36              
  Lines             7107     7110       +3     
===============================================
+ Hits              7091     7092       +1     
- Misses              16       18       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pulsipher pulsipher merged commit bdb5560 into release-0.5 May 1, 2024
8 of 10 checks passed
@pulsipher pulsipher deleted the nlp_patch branch May 1, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant