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
This was prompted by #130. My current package versions are
[1e616198] COSMO v0.7.9
[4076af6c] JuMP v0.21.4
Here is a simple problem construction which has a sparsity structure very similar to some SDPs I'm solving:
using COSMO, SparseArrays, JuMP, LinearAlgebra, Random
Random.seed!(1234)
# Makes a subblock of size 3 w.p. ~ 98% and of size 201 otherwisefunctionblock(i, n)
A =spzeros(n, n)
block_size =randn() >-2?2:200
A[i:min(i+block_size,n), i:min(i+block_size,n)] .=1return A
end
n =400
m =Model(COSMO.Optimizer)
A =spzeros(GenericAffExpr{Float64, VariableRef}, n, n)
@variable(m, u[1:n])
for i=1:n
Q =block(i, n)
for (j, k, v) ∈zip(findnz(Q)...)
A[j,k] =0.0001add_to_expression!(A[j, k], u[i], v)
endend@shownnz(A)
@constraint(m, A -sparse(I(n)) ∈PSDCone())
@info"Finished adding constraints"@objective(m, Min, 0)
optimize!(m)
In particular, note that the time spent "canonicalizing" the problem is rather large, even though the per-iteration cost for solving is decidedly not. I'm not sure what can be done to improve this? Perhaps a second also important question that I'm not sure about is: what's the best way of writing a standard dual form SDP in JuMP?
I will take a quick stab at profiling this, but I don't know much about COSMO.jl per se, so it's very likely I won't be particularly useful here :)
Anyways, thank you again for all of your work!
The text was updated successfully, but these errors were encountered:
This was prompted by #130. My current package versions are
Here is a simple problem construction which has a sparsity structure very similar to some SDPs I'm solving:
In particular, note that the time spent "canonicalizing" the problem is rather large, even though the per-iteration cost for solving is decidedly not. I'm not sure what can be done to improve this? Perhaps a second also important question that I'm not sure about is: what's the best way of writing a standard dual form SDP in JuMP?
I will take a quick stab at profiling this, but I don't know much about COSMO.jl per se, so it's very likely I won't be particularly useful here :)
Anyways, thank you again for all of your work!
The text was updated successfully, but these errors were encountered: