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

remove reference to SOSPoly in error message #29

Closed
wants to merge 1 commit into from

Conversation

chriscoey
Copy link
Contributor

SOSPoly lives in SumOfSquares.jl and is an approximation of >= 0, so the comment is unnecessary/confusing

SOSPoly lives in SumOfSquares.jl and is an approximation of >= 0, so the comment is unnecessary/confusing
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.859% when pulling e13c7ff on chriscoey-patch-1 into 4eb3585 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.859% when pulling e13c7ff on chriscoey-patch-1 into 4eb3585 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.859% when pulling e13c7ff on chriscoey-patch-1 into 4eb3585 on master.

@blegat
Copy link
Member

blegat commented Nov 2, 2018

If the user write @constraint(model, p >= 0, Poly(X)) we can guess that he is trying to create a nonnegative polynomial variable. He is probably using SumOfSquares and once he figures out he needs to use SOSPoly he will probably not guess that the meaning of X changes. It seems to me that this error message is helping the user. Of course it is not the case if he is not using SumOfSquares but at the moment as far as I know there is no other way to create a nonnegative polynomial with PolyJuMP so he should probably look into SumOfSquares. Once there are other extensions we can adapt the message

@chriscoey
Copy link
Contributor Author

The user is already warned here if they are not using SumOfSquares.

This message breaks the abstraction of PolyJuMP being about modeling with nonnegative polynomials (and SumOfSquares being responsible for approximating the true >= 0 polynomial nonnegativity constraint using SOS techniques). Hence I believe it is actually confusing. Why don't we suggest here that the user use NonNegPoly(X) (instead of SOSPoly(X))?

@blegat
Copy link
Member

blegat commented Nov 3, 2018

NonNegPoly is for constraints as it does not have any field to store a monomial vector. We could have an equivalent for nonnegative polynomial vectors then if the user use it then he would see the error you mention if he didn't set any polymodule. That would work

@chriscoey
Copy link
Contributor Author

Perfect

@chriscoey
Copy link
Contributor Author

see #30

@chriscoey chriscoey closed this Nov 20, 2021
@odow odow deleted the chriscoey-patch-1 branch March 27, 2022 20:44
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.

3 participants