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
functiontest(ztol=Base.rtoldefault(Float64))
X = [0.5459627556242905, 1.7288950489507429, 0.7167681447476535]
Y = [-54.06002080721971, 173.77393714162503, 71.48154370522498]
n =3@polyvar W[1:n] α β
I =@set(sum([W[i] * X[i] * (β * X[i] + α - Y[i]) for i =1:n]) ==0, library =Buchberger(ztol))
for i in1:n
addequality!(I, W[i] - W[i]^2)
end
SemialgebraicSets.computegröbnerbasis!(I.I)
I
end
The Groebner basis found does not seem to be correct, it gives incorrect results with jump-dev/SumOfSquares.jl#269
as it does no match the lagrangian version
using SumOfSquares
using DynamicPolynomials
using MosekTools
using LinearAlgebra
using SCS
using JuMP
functiontest(solver, d, obj, I, lagrangian_monos)
model =SOSModel(solver)
@variable(model, t)
if lagrangian_monos isa Float64
display(I)
c =@constraint(model, t >= obj, domain = I, maxdegree = d)
@showmoi_set(constraint_object(c)).certificate
@showmoi_set(constraint_object(c)).domain
@show I.I.gröbnerbasis
display(I)
else
p =equalities(I)
@variable(model, multipliers[eachindex(p)], Poly(lagrangian_monos))
@constraint(model, t >= obj + multipliers ⋅ p)
end@objective(model, Min, t)
optimize!(model)
solution_summary(model)
endfunctionsol(solver, d, ztol)
X = [0.5459627556242905, 1.7288950489507429, 0.7167681447476535]
Y = [-54.06002080721971, 173.77393714162503, 71.48154370522498]
n =3@polyvar W[1:n] α β
I =@set(sum([W[i] * X[i] * (β * X[i] + α - Y[i]) for i =1:n]) ==0, library =Buchberger(ztol))
#I = @set sum([W[i] * X[i] * (β * X[i] + α - Y[i]) for i = 1:n]) == 0for i in1:n
addequality!(I, W[i] - W[i]^2)
end
obj =sum(W)
if ztol ===nothing
monos =monomials([α, β], 0:d)
else
monos = ztol
endtest(solver, d, obj, I, monos)
end
Probably need take into account Section 10.1.3 of Stetter's "Numerical Polynomial Algebra".
The text was updated successfully, but these errors were encountered:
The Groebner basis found does not seem to be correct, it gives incorrect results with
jump-dev/SumOfSquares.jl#269
as it does no match the lagrangian version
Probably need take into account Section 10.1.3 of Stetter's "Numerical Polynomial Algebra".
The text was updated successfully, but these errors were encountered: