From CVX to Gurobi

Hi everyone,

I need to figure out whether there’s a (quick) way for translating a problem formulated in CVX to Gurobi, always in the matlab framework. Unfortunately indeed I can no longer use CVX, and thus I have to port the code scripts I wrote under CVX at lower level (Gurobi). Apart from manual conversion, that can be very complicated, is there a way of doing this?, For example by exporting thhe CVX problem into a file format like .lp or .mps?

thanks a lot

CVS has no such capability.

It might be possible to change your CVX code to YALMIP code without too much trouble. Then use YALMIP’s export capability. This may or may not meet your needs.

Dear Mark,

thanks for your reply. How specifically can I export a problem in LP or MPS format from yalmip, so that it’s readable by Gurobi ?

thank you

Perhaps it would suit your purpose to call Gurobi as the solver from YALMIP, rather than exporting from YALMIP to Gurobi.

In any event, these are matters for the YALMIP wiki and forum. not the CVX forum.

1 Like