SCSSolver in Convex and JuMP

The SCS solver is for convex cone problems, but Convex.jl manages to use it to solve quadratic problems; JuMP.jl instead throws an error.

On the other hand, Ipopt seems to be working fine with JuMP but Convex complains.

using Convex, JuMP, SCS, Ipopt

n = 5
s = Convex.Variable(n)
problem = minimize(sumsquares(s))
solve!(problem, SCSSolver()) # this is fine

problem = Model(solver = SCSSolver())
@variable(problem, q[1:n])
@objective(problem, Min, sum(q[i]^2 for i = 1:n))
status = solve(problem) # this throws an error

s = Convex.Variable(n)
problem = minimize(sumsquares(s))
solve!(problem, IpoptSolver()) # this throws an error

problem = Model(solver = IpoptSolver())
@variable(problem, q[1:n])
@objective(problem, Min, sum(q[i]^2 for i = 1:n))
status = solve(problem) # this is fine

Maybe the explanation is that Convex.jl knows how to translate sumsquares() into conic form, and therefore feed the problem to SCS.

For JuMP, the problem looks like it requires a LinearQuadratic solver, which SCS isn’t.

For Ipopt, the story is reversed. It does not accept the conic form, but requires expressions, like a Nonlinear solver.

Within MathProgBase, there exist all kinds of bridges between these solver types, but maybe they are missing here.

Do you know if this is explained somewhere in Convex Optimization?

I think you have better luck with the separate paper on disciplined convex programming by Michael Grant.

1 Like

Do you mean eq. 13 of book chapter and the discussion in that section?

You could also look at the Convex.jl paper. Convex.jl implements disciplined convex programming to turn everything into conic form. JuMP does not.

2 Likes