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

ERROR: UndefVarError: add_constraint not defined #20

Closed
weiqiao opened this issue Jan 31, 2021 · 5 comments · Fixed by jump-dev/SumOfSquares.jl#183
Closed

ERROR: UndefVarError: add_constraint not defined #20

weiqiao opened this issue Jan 31, 2021 · 5 comments · Fixed by jump-dev/SumOfSquares.jl#183

Comments

@weiqiao
Copy link

weiqiao commented Jan 31, 2021

When I tried to add constraints like
@constraint gmp Mom(1, mu) == 1
as in https://juliahub.com/docs/MomentOpt/Nuha4/0.2.0/started/
I always got error

WARNING: both SumOfSquares and JuMP export "add_constraint"; uses of it in module MomentOpt must be qualified
ERROR: UndefVarError: add_constraint not defined

I have tried both Julia 1.5.3 and Julia 1.0.5 on both MacOS and Ubuntu 20.04.

@weiqiao
Copy link
Author

weiqiao commented Jan 31, 2021

@tweisser

@huihanl
Copy link

huihanl commented Feb 1, 2021

I have the same error as above:

image

I'm using Julia 1.5.3 on Mac. Thanks for looking that up! @tweisser

@blegat
Copy link
Collaborator

blegat commented Feb 1, 2021

That was caused by jump-dev/SumOfSquares.jl#174, should be resolved with jump-dev/SumOfSquares.jl#183

@blegat
Copy link
Collaborator

blegat commented Feb 1, 2021

This should be resolved with SumOfSquares v0.4.5, please reopen the issue if that's not the case

@weiqiao
Copy link
Author

weiqiao commented Feb 1, 2021

This should be resolved with SumOfSquares v0.4.5, please reopen the issue if that's not the case

This solved the problem, thanks! Though I'm getting a different error #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants