Hello,
I’m trying to find some sum of squares representation for some polynomials, but I have been receiving some errors. Here is a shortened version of this code that gives this error:
using TypedPolynomials
using Combinatorics
using CSDP
using SumOfSquares
@polyvar a b
@polyvar x[1:2]
q = (a *x[1]+b*x[2])^2
Derb = subs(differentiate(q, b), a=> 1, b => -1)
solver = optimizer_with_attributes(CSDP.Optimizer)
model = SOSModel(solver)
@variable(model, c)
@constraint(model, cref, Derb in SOSCone())
@objective(model, Min, 0)
JuMP.optimize!(model)
This gives the error
ERROR: LoadError: ArgumentError: Empty constraint MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.EqualTo{Float64}}[MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.EqualTo{Float64}}(1), MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.EqualTo{Float64}}(2)]: MathOptInterface.ScalarAffineFunction{Float64}(MathOptInterface.ScalarAffineTerm{Float64}[], 0.0)-in-MathOptInterface.EqualTo{Float64}(2.0). Not supported by CSDP.
What is the issue here? The actual polynomials I would like to prove are SOS are somewhat more complicated than this, but are also the derivatives of some other polynomials, with some variables then fixed to specific values.
Thanks - Kevin