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
I have been testing a simple SDP problem from Boyd's book (skipping creating matrices A and b). Tried the formulation with both MathOptInterfaceMosek and SCS.
The CVX code is as follows
Version1: same as CVX examplecvx_beginSDPvariableX(n,n) symmetricvariablex(n)
minimize(trace(A'*A*X)-2*b'*A*x+b'*b)
subjectto
[X,x;x',1]>=0;
for i=1:n
X(i,i) ==1;
endcvx_end
This formulation, when paired with any of the solvers above throws this error in both cases:
Constraints of type MathOptInterface.VectorAffineFunction{Float64}-in-MathOptInterface.PositiveSemidefiniteConeSquare are not supported by the solver and there are no bridges that can reformulate it into supported constraints.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] add_constraint(::Model, ::JuMP.VectorAffExprConstraint{VariableRef,MathOptInterface.PositiveSemidefiniteConeSquare,JuMP.SquareMatrixShape}, ::String) at /Users/jdlara/.julia/packages/JuMP/KjUjh/src/JuMP.jl:532
[3] top-level scope at /Users/jdlara/.julia/packages/JuMP/KjUjh/src/macros.jl:479
[4] top-level scope at In[59]:21
Which I believe is what the bridge does on the background, then the problem optimizes successfully and the answer is consistent with CVX. Moreover, if I re-write the equivalent formulation as follows:
SDP_bool =Model(with_optimizer(MosekOptimizer))
#same problem with SCS.Optimizer@variable(SDP_bool, M[1:11,1:11], Symmetric);
@constraint(SDP_bool, diag_ones[i=1:11], M[i,i] ==1);
@constraint(SDP_bool, eq_offdiag[i=1:10], M[11,i] == M[i,11])
@SDconstraint(SDP_bool, SD_con, M >=0)
@objective(SDP_bool, Min, tr(A'*A*M[1:10, 1:10]) - (2*b'*A*M[1:10,11]) + (b'b)[1])
JuMP.optimize!(SDP_bool)
JuMP throws the same error Constraints of type MathOptInterface.VectorAffineFunction{Float64}-in-MathOptInterface.PositiveSemidefiniteConeSquare are not supported by the solver and there are no bridges that can reformulate it into supported constraints.
It isn't clear if the error originates in MOI or JuMP, given that the last line in the stack trace is in JuMP the decision was to post here.
The text was updated successfully, but these errors were encountered:
I have been testing a simple SDP problem from Boyd's book (skipping creating matrices
A
andb
). Tried the formulation with bothMathOptInterfaceMosek
andSCS
.The CVX code is as follows
The Julia/JuMP implementation is
This formulation, when paired with any of the solvers above throws this error in both cases:
If the problem is reformulated as follows:
Which I believe is what the bridge does on the background, then the problem optimizes successfully and the answer is consistent with CVX. Moreover, if I re-write the equivalent formulation as follows:
JuMP throws the same error
Constraints of type MathOptInterface.VectorAffineFunction{Float64}-in-MathOptInterface.PositiveSemidefiniteConeSquare are not supported by the solver and there are no bridges that can reformulate it into supported constraints.
It isn't clear if the error originates in MOI or JuMP, given that the last line in the stack trace is in JuMP the decision was to post here.
The text was updated successfully, but these errors were encountered: