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