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

Throw error for add_to_expression with GenericNonlinearExpr #3506

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

odow
Copy link
Member

@odow odow commented Sep 14, 2023

Closes #3505

We can always revisit this in future if more people ask for it.

test/test_nlp_expr.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (beb1826) 98.14% compared to head (24675c0) 98.14%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3506   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files          37       37           
  Lines        5545     5547    +2     
=======================================
+ Hits         5442     5444    +2     
  Misses        103      103           
Files Changed Coverage Δ
src/nlp_expr.jl 99.52% <100.00%> (+<0.01%) ⬆️

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

@odow odow mentioned this pull request Sep 14, 2023
25 tasks
@blegat
Copy link
Member

blegat commented Sep 14, 2023

Maybe redirect to MA.add_mul!! ?

@odow
Copy link
Member Author

odow commented Sep 14, 2023

I don't think we can redirect to add_mul!! because add_to_expression! is in-place only.

@hdavid16
Copy link
Contributor

That works. add_mul!! is behind the internal _MA in JuMP. So would the user need to load MA separately from JuMP?

@odow
Copy link
Member Author

odow commented Sep 15, 2023

So would the user need to load MA separately from JuMP?

Yes

@blegat
Copy link
Member

blegat commented Sep 16, 2023

I meant redirecting in the error message

test/test_nlp_expr.jl Outdated Show resolved Hide resolved
@odow
Copy link
Member Author

odow commented Sep 17, 2023

Done

@odow odow merged commit 0cb5033 into master Sep 18, 2023
@odow odow deleted the od/error-add-to-expression branch September 18, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Extend add_to_expression! for NonlinearExpr
3 participants