Convex solvers

423 views
Skip to first unread message

Mario Zanon

unread,
Nov 8, 2017, 5:45:24 AM11/8/17
to CasADi
Hi guys!

I was wondering, the qpsolver is now called convex, but as far as I see only qp solvers are supported. Is there by chance also a more generic convex solver in casadi? e.g. for SOCPs.

Thanks a lot in advance!

Ciao,
Mario

Joel Andersson

unread,
Nov 8, 2017, 10:16:09 AM11/8/17
to CasADi
Yes, the plan is to extend the Conic class to handle more general convex problems. The current plan is to add support for SDPs. Here is the issue for that: https://github.com/casadi/casadi/issues/2110

For SOCP support, my plan was to add an "soc" helper function:

soc(x,y) = [I*y, x; x', y]

Then you can write the SOC constraint

y >= |x|_2

as

soc(x,y) is pos. semidefinite.

I will probably work on this as an academic project together with some grad students in the group. PM me if you want to join the effort.

Joel

Mario Zanon

unread,
Nov 8, 2017, 12:22:54 PM11/8/17
to CasADi
That looks great! Though not the most efficient way to implement SOC constraints, it allows the most generic formulation.

Looking forward to it!

Any plan to link against e.g. ECOS?

Joris Gillis

unread,
Nov 8, 2017, 12:27:59 PM11/8/17
to CasADi
For sure ECOS. In fact we had ECOS and MOSEK interfaces for convex programming in 2.4.* branch...

  Joris

Joel Andersson

unread,
Nov 8, 2017, 12:33:50 PM11/8/17
to CasADi
Matrices in CasADi are sparse. If there is a solver with support for SOCP, they can easily recover the SOCP structure from the SDP. In general, an SDP constraint will be a block diagonal concatenation of smaller blocks, that can treated separately. A 1-by-1 block is a linear constraint. A block with the arrowhead structure above can easily be identified as an SOCP constraint. So the idea is to to only support SDP in the interface, for maintainability, but then allow solver plugins to take this apart into multiple simpler convex cones, for efficiency.

Joel

Horea Alexandru Caramizaru

unread,
Jun 1, 2022, 9:41:51 AM6/1/22
to CasADi
Dear All,
I would like to use an SDP solver to manage MLI constraints. From what I can see, this issue is still open:

What would you consider a good workaround?  What do you think about the solution proposed? ( integrating CVX as an external CasADi function )

Best,
Alex C.
Reply all
Reply to author
Forward
0 new messages