You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using DynamicPolynomials
using SumOfSquares
using MosekTools
solver =optimizer_with_attributes(Mosek.Optimizer, MOI.Silent() =>false)
model =SOSModel(solver);
@polyvar x
V =1+ x
S =@set x^2==1@variable(model, γ)
@constraint(model, V <= γ, domain = S)
@objective(model, Min, γ)
optimize!(model)
@showtermination_status(model)
moment_matrix(c)
It's a bit counter-intuitive and we should mention something in the docs and have an example.
What happens is that the monomials of V - γ are [x, 1] so the newton polytope method find [1] which does not work.
Using maxdegree solves the issue, we should mention the importance of maxdegree when there is equalities in the domain.
using DynamicPolynomials
using SumOfSquares
using MosekTools
solver =optimizer_with_attributes(Mosek.Optimizer, MOI.Silent() =>false)
model =SOSModel(solver);
n =1@polyvar x[1:n]
V =1+sum(x)
S =algebraicset([x[i]^2-1for i in1:n])
@variable(model, γ)
c =@constraint(model, V <= γ, domain = S, maxdegree =2)
@objective(model, Min, γ)
optimize!(model)
@showtermination_status(model)
gram_matrix(c)
Moreover, it's unclear how to create the hypercube from a vector of x. We should have an example with algebraicset and mention something in the doc
The text was updated successfully, but these errors were encountered:
The following is infeasible:
It's a bit counter-intuitive and we should mention something in the docs and have an example.
What happens is that the monomials of
V - γ
are[x, 1]
so the newton polytope method find[1]
which does not work.Using
maxdegree
solves the issue, we should mention the importance ofmaxdegree
when there is equalities in the domain.Moreover, it's unclear how to create the hypercube from a vector of
x
. We should have an example withalgebraicset
and mention something in the docThe text was updated successfully, but these errors were encountered: