Mosek and Ipopt

when I use Ipopt as folows:

m = Model(Ipopt.Optimizer)
set_optimizer_attributes(m, "LOG" => 0)
g_p_max_soc=vcat(node[i].p̅ - g_p[i],arg_p)
@constraint(m, g_p_max_soc in SecondOrderCone())

there are errors as below:

MOI.VectorAffineFunction{Float64}`-in-`MOI.SecondOrderCone` constraints are not supported and cannot be bridged into supported constrained variables and constraints. See details below:

but when I use Mosek solver instead

m = Model(Mosek.Optimizer)
set_optimizer_attributes(m, "LOG" => 0)

The porgram is ok. I don’t know why. Thanks for your reply.

If you look here: Installation Guide · JuMP, it lists the solvers and what kinds of problems they support. Optimization with a constraint with SecondOrderCone() like you have is called SOCP (second-order cone programming), so you need a solver that supports that, like Mosek. As the error message says, Ipopt doesn’t support that kind of problem, and JuMP can’t automatically reformulate the problem in a way that Ipopt does support.


Thank you very much, I have known it.
I thougt Ipopt could solve socp problem, until I just saw this instruction manual

1 Like

Side note, if you reformulate your SecondOrderCone constraint in a polynomial or QCQP form then you can send it to Ipopt.

1 Like

Ok,thank you @ericphanson , I tried Gurobi solver, program could work well.
Also, thank you @ccoffrin , I will try reformulate SecondOrderCone constraint in a polynomial or QCQP form, and solve problem with Ipopt.