This is just the comment of jump-dev/MathOptInterface.jl#2198 moved here
Note that once this is done, you can write an SDP in SDPA format directly in JuMP with something like
C = rand(d, d)
A = [rand(d, d) for i in 1:m]
model = Model()
@variable(model, x[1:m+1] in MOI.SetWithDotProducts(
MOI.PositiveSemidefiniteConeTriangle(d),
MOI.TriangleVectorization.([A; [C]]),
))
@constraint(model, x[1:m] == b)
@objective(model, Min, x[end])
or
model = Model()
@variable(model, y[1:m])
@constraint(model, [y; -1] in MOI.LinearCombinationInSet([A; [C]]))
@objective(model, Max, dot(y, b))
And Dualization.dualize should take you from one to the other one!
Solvers implementing this:
Basic
Utilities
Documentation
Tests
MathOptFormat
Optional
This is just the comment of jump-dev/MathOptInterface.jl#2198 moved here
Note that once this is done, you can write an SDP in SDPA format directly in JuMP with something like
or
And
Dualization.dualizeshould take you from one to the other one!Solvers implementing this:
Hypatia.LinMatrixIneqCone:A1PSD andA2, ..., A[m]arbitraryHypatia.WSOSInterpNonnegativeCone:A = u u'(Rank-1 PSD) Add support for SumOfSquares cone jump-dev/Hypatia.jl#844DSDP:A = a * u * u'(Rank-1) Add support for rank-1 constraints jump-dev/DSDP.jl#37SDPLR:A = U * Diagonal(d) * U'(Low-Rank) Add support for low rank constraint jump-dev/SDPLR.jl#26Basic
AbstractScalarSetorAbstractVectorSettosrc/sets.jlisbitstype(S) == false, implementBase.copy(set::S)isbitstype(S) == false, implementBase.:(==)(x::S, y::S)AbstractVectorSet, implementdimension(set::S), unless thedimension is given by
set.dimension.Utilities
AbstractVectorSet, implementUtilities.set_dot,unless the dot product between two vectors in the set is equivalent to
LinearAlgebra.dotAbstractVectorSet, implementUtilities.set_with_dimensioninsrc/Utilities/matrix_of_constraints.jl@modelmacro at the bottom ofsrc/Utilities.model.jlDocumentation
along with an
## Exampleblock containing ajldoctestdocs/src/reference/standard_form.mddocs/src/manual/standard_form.mdTests
_set(::Type{S})method insrc/Test/test_basic_constraint.jland add the name of the set to the list at the bottom of that files
test/sets.jlMathOptFormat
https://github.com/jump-dev/MathOptFormatto addsupport for the new set {{ replace with link to the issue }} I don't think we should add any set specialization of that set or at least not yet
Optional
dual_set(::S)anddual_set_type(::Type{S})Testsubmodule exercising your new set