constraint sum(P) == 0 only if element and orderunit are augmented

This commit is contained in:
kalmarek 2020-01-10 16:55:13 +01:00
parent f9d0b85628
commit 94c5481952
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
1 changed files with 3 additions and 1 deletions

View File

@ -49,7 +49,9 @@ function SOS_problem(X::GroupRingElem, orderunit::GroupRingElem; upper_bound::Fl
JuMP.@variable(m, P[1:N, 1:N])
# SP = Symmetric(P)
JuMP.@constraint(m, sdp, P in PSDCone())
JuMP.@constraint(m, sum(P[i] for i in eachindex(P)) == 0)
if iszero(aug(X)) && iszero(aug(orderunit))
JuMP.@constraint(m, sum(P) == 0)
end
if upper_bound < Inf
λ = JuMP.@variable(m, λ <= upper_bound)