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

A trivial example that returns infeasible #290

Open
AlexandreAmice opened this issue Mar 29, 2023 · 2 comments
Open

A trivial example that returns infeasible #290

AlexandreAmice opened this issue Mar 29, 2023 · 2 comments

Comments

@AlexandreAmice
Copy link

AlexandreAmice commented Mar 29, 2023

The following univariate example returns infeasible even though it should be a very simple problem. For the purposes of debugging, is it possible to have the domain of the SOS constraint printed out?

using DynamicPolynomials
using SumOfSquares
using MosekTools
@polyvar x
S = @set -1 <= x && x <= 1

import Mosek
model = SOSModel(Mosek.Optimizer)
set_silent(model)
con_ref = @constraint(model, x^2 <= 1.1, domain = S)
optimize!(model)
solution_summary(model)
@odow
Copy link
Member

odow commented Apr 10, 2023

@blegat is this expected?

I think it's because you don't actually have a free decision variable in your model?

@blegat
Copy link
Member

blegat commented Apr 11, 2023

is it possible to have the domain of the SOS constraint printed out?

Yes, that shouldn't be too hard

Maybe try increasing the maxdegree in the constraint keyword argument ?

I'm guessing the issue is that you're using the Putinar certificate instead of the Schmudgen one which would add (x + 1) * (x - 1) as well.
See https://jump.dev/SumOfSquares.jl/latest/generated/Extension/certificate
We could add an easy way to do Schmudgen (or even do it by default). I was a bit worried that it would add 2^(n-1) polynomials but you quickly get a too high degree anyway so you never really add that many polynomials.

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

No branches or pull requests

3 participants