CVX on Octave: coming soon—see a live demo!

Important note: CVX is not compatible with the Octave 3.8.1 or earlier. Please do not try to install it—you will waste your time! But read on for some good news.

One of the more common questions we have been asked over the years is why CVX cannot run on Octave, a free alternative to Matlab. Since Octave aims to allow Matlab packages to run with little or no modification, it is certainly a good question! Unfortunately, it simply is not possible—yet.

A little history

We have been talking about Octave support since the “embedded modeling language” design of CVX was first conceived in early 2005. Implementing this design relies on quite a few of Matlab’s more esoteric language features. At the time, those features were not present in Octave; and some of them are still missing today.

When version 3.8.0 of Octave was released this past December, it was very clear that the “CVX feature gap” was significantly reduced, so I began working with the Octave source code myself. I submitted several patches that would close the gap completely, allowing CVX to run on Octave. Many of these patches have already been accepted into Octave 3.8.1, while others have been accepted into the official development tree for a future release. A few others are pending, but the leader of the Octave project has been very helpful, and shares my confidence that the official Octave releases will soon support CVX.

A live demo!

UPDATE: I’m afraid this live demo is no longer active. We’ll look into ways to resurrect a live demo soon.

Would you like some proof? How about this: the folks at Terminal.com have put together an on-line, web-based demo of Octave running CVX. Click here to go right to the CVX demo page; click the “Run” button, and it will launch a web-based interface to a cloned virtual machine running the software. You can try the example library, enter your own models, even plot results.

Please keep in mind that this is a patched version of Octave that is not available to the general public. (Please do not ask for it.) But it is running the very same version of CVX that you can download today. And of course, if the Terminal.com virtual machine is sufficient for your purposes, then you can indeed work with CVX on Octave now!

Porting the solvers

Of course, CVX is useless without solvers! Fortunately, work had already been done to make SeDuMi compatible with Octave, and I have worked to improve upon that. I’ve also ported SDPT3 to Octave as well. The updated versions of these solvers are now available on GitHub, so you do not have to wait for CVX to use them. In addition, I have added support for GLPK, the GNU Linear Programming Kit, in CVX. We will not be bundling GLPK with CVX; but since it is included with most Octave installations, we do not need to! (Note: CVX’s connections to commercial solvers, including Gurobi and MOSEK, will remain limited to Matlab, for both technical and contractual reasons.)

The news is good.

CVX is ready! And Octave will be ready soon, too. Please watch our web site, our Google+ page, or our Twitter feed for the announcement. We’re very pleased to be able to offer CVX on a free computation platform for the first time.

What’s next? Well, we hope to bring CVX to other computational platforms as well. Clearly that takes a lot more work that porting it to another MATLAB-compatible platform. But it is work we have already started…