An important note about the future of CVX

[Summary: we are transitioning CVX to a fully open-source model that we hope will allow it to remain available and usable for the foreseeable future.]

The first publicly available version of CVX on MATLAB was released in 2005—19 years ago. Stephen Boyd and I, Michael Grant, could not have predicted at the time how popular this tool would become, 19 years on. Despite my extended absence from academia, I still receive over 1500 citations per year according to Google Scholar. And we are particularly proud that CVX was selected to receive the Beale Orchard-Hayes Prize for Excellence in Computational Mathematical Programming in 2012. The CVX Forum continues to be an active source of support for CVX users, thanks to key contributions from volunteers.

For the last 9 years, I (Michael) have been a member of Anaconda, Inc.—a company focused on the use of the Python language and ecosystem to advance the state of data science, machine learning, and AI. It has been an ideal company for someone with my skill set, and I have served in a variety of technical, management, and leadership roles. While I joined the company with full permission to continue supporting CVX, my obligations to the company—and to provide for my family!—necessarily took precedence. It has been clear for some time that I am unable to offer the level of support that a user of CVX might reasonably expect.

For that reason, I am moving CVX to a fully open-source model. Most of CVX has always been open-source, of course; but the support for commercial solvers such as Gurobi and MOSEK utilize a closed-source license management system of my own design, enabling CVX Research, Inc. to realize a modest revenue stream from commercial use of CVX. Effective immediately, CVX is free to use for all purposes, academic or commercial, even when paired with commercial solvers.

Over the coming 2-3 months, we will be migrating the primary hosting, maintenance, and distribution of CVX to GitHub. In fact, that work has already begun. When complete:

It is our hope that once this transition to a full open-source distribution is complete, we can identify a core group of contributors who can field bug reports and implement improvements as needed. It is clear that CVX does not require significant ongoing improvements to remain useful to the convex optimization community! Nevertheless, the ability to make small corrections and improvements would undoubtedly be useful.

I hope that these changes prove to benefit the CVX community at large. To close, I’d like to offer my sincere gratitude to some key members of that community.

And of course, thank you to all of the users of CVX who have found it useful enough to them to offer their personal thanks to us, and to cite us in their published work!

Important announcement: academic license changes

Over 6 years ago, we released version 2.0 of CVX, enabling its use with commercial solvers Gurobi and MOSEK. These solvers make CVX significantly more powerful. We decided to make this a closed-source add-on so that we could fund CVX development and support through the sale of licenses to commercial entities.

Of course, we are fully committed to offering academic users full functionality at no charge, so we built a semi-automated academic license generator. Unfortunately, the support burden required to maintain this generator is no longer sustainable. For this reason, we are making the following changes, effective immediately.

Starting with build 1127 of CVX 2.1—released in December, 2018—you no longer need a CVX Academic license to use CVX with Gurobi or MOSEK. Full interoperability has been unlocked for these solvers as long as you have a valid license, properly installed, from the vendors themselves:

Make sure that you follow the full instructions for each solver for obtaining the license and installing it in the proper location.

Some additional notes:

The first publicly available version of CVX was released in 2005—over 13 years ago.  We had no idea that it would prove so useful to so many. Thank you to everyone through the years for using it, for citing it, and for offering us encouragement!

TFOCS wins the Beale Orchard-Hayes Prize!

From left to right: Bill Cook, MOS President; Stephen Becker; Michael Grant; Robert Bixby, co-founder of Gurobi Optimization, nomination committee member.

From left to right: Bill Cook, MOS President; Stephen Becker; Michael Grant; Robert Bixby, co-founder of Gurobi Optimization, nomination committee member.

Stephen Becker, Emmanuel Candès, and Michael Grant were selected to win the 2015 Beale Orchard-Hays Prize for Excellence in Computational Mathematical Programming. The prize was awarded for TFOCS as presented in journal article we published about it. The presentation took place on July 12, 2015 at the opening ceremony of the International Symposium for Mathematical Programming in Pittsburgh, Pennsylvania, USA. Gurobi co-founder Robert Bixby, member of the prize committee, read the citation, and Mathematical Optimization Society President Bill Cook joined in the presentation as well.

We want thank our nominators, the award committee, and the Mathematical Optimization Society for a wonderful honor.

This award is presented once every three years, and you may recall that this is not the first mention of the Beale Orchard-Hayes prize in this news feed. In fact, CVX was the recipient of this very prize in 2012! Michael Grant is now the first person to win this prize twice. He is making no promises about a third.

The conference is wrapping up today, so the official citation has not yet been posted to the MOS web site. As soon as that changes, we will include it in this post.

CVX on Octave: an update

GNU Octave 4.0 was released on May 29, 2015. This was the culmination of a lot of hard work. The Octave development should be proud! I’m pleased to find that the patches I submitted to allow for CVX compatibility were scheduled for 4.0. That means we are now a lot closer to supporting CVX on Octave!

The current build of CVX 3.0 is functional enough in Octave 4.0 to be considered “alpha” quality. We are not ready to begin providing support for Octave, but if you enjoy testing bleeding edge software, you are more than welcome to give it a try.

There are some very important caveats to consider, however, before proceeding.

I cannot emphasize this enough: we do not support CVX on Octave yet. If you need CVX for your research, you would be taking an unreasonable risk to depend on the Octave version. So don’t; stick with MATLAB.

But we’re getting there. Once we are satisfied with the stability of CVX on Octave, and we have figured out how to supply binaries for the major platforms, we will make further announcements!

CVX featured in new optimization textbook

textbookIt is always uplifting to see one’s work cited in a scientific publication. How much more of a thrill it is, then, to see it incorporated into a textbook, and presumably into courses that rely upon the book!

For years, the textbook Convex Optimization by Stephen Boyd and Lieven Vandenberghe has been used in courses around the world, and many have incorporated CVX into their assignments and exams. On October 27, a new book was released that should do the same: Introduction to Nonlinear Optimization: Theory, Algorithms, and Applications with MATLAB by Amir Beck, Associate Professor of Industrial Engineering and Management at the Technion.

From the book’s web page:

This book provides the foundations of the theory of nonlinear optimization as well as some related algorithms and presents a variety of applications from diverse areas of applied sciences. The author combines three pillars of optimization—theoretical and algorithmic foundation, familiarity with various applications, and the ability to apply the theory and algorithms on actual problems—and rigorously and gradually builds the connection between theory, algorithms, applications, and implementation.

Chapter 8, a sample of which is provided on the site, Prof. Beck provides a surprisingly comprehensive introduction to CVX, offers an number of examples of complete CVX models, and includes several exercises calling upon readers to build their own CVX models.

It really is a wonderful source of encouragement that CVX is trusted enough to be incorporated into teaching. You’ve made our day, Prof. Beck, thank you!

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 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 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…

New demo video for CVX

As of February 20, over 10000 students are enrolled in CVX101, Stanford University’s online course in convex optimization offered by Professor Stephen Boyd and colleagues. This course has been taught using Stanford’s internal video distance learning platform for years, so it is well suited for the OpenEdX MOOC platform.

Our Matlab package CVX is being used throughout the course. The Mathworks is providing time-limited Matlab licenses to all enrollees for the duration of the course.

To provide enrollees with a gentle introduction to CVX, Prof. Boyd recorded the following video. If you’re not yet a CVX user yourself, you might find it useful as well!

TFOCS is now fully open source

We are pleased to announce that the authors of TFOCS, in conjunction with copyright holders CVX Research and the California Institute of Technology, have agreed to release TFOCS under a permissive 3-Clause BSD license. It is our sincere hope that moving to a permissive open source license will encourage wider use and community-driven improvements.

As part of our shift to this new license, we have moved the source repository for TFOCS to GitHub. From this site, users can download a versioned release, clone the repository for more frequent updates, or create their own fork for customization.

Community support for TFOCS is available on CVX Forum, a question and answer site modeled after the popular StackExchange family of sites. The forum serves users of both TFOCS and the namesake package CVX. For more dedicated assistance, paid support contracts are available from the packages’ authors.

For more details, please visit the TFOCS home page. The full text of the license is available on the download page as well as in the file LICENSE in the package itself.

Bundled versions of Gurobi and MOSEK now available with CVX

One of the key features added to CVX 2.0 is the ability to connect to the commercial solvers Gurobi and MOSEK. Both solvers are highly respected in the optimization community, and we have found that they work very well with CVX. These solvers have also enabled us to support mixed-integer modeling.

This week we have taken a step to further simplify the process of using CVX with these solvers by bundling them with CVX itself. Of course, if you already use CVX with these solvers, nothing has changed—you can continue to connect CVX to your existing Gurobi and MOSEK installations. But now it is even easier for new users of CVX to use our modeling framework with these excellent solvers.

Some technical details:

We have improved our installation instructions to cover the details of installing a CVX Professional License, and have created separate sections describing how to install and use Gurobi and/or MOSEK with CVX.

Because these bundles are a new offering for us, we have decided to keep the “beta” version designation for just a bit longer, in case this wider release reveals some installation issues. But we have many users happily using Gurobi and MOSEK with CVX already, so we encourage you download CVX 2.0 now.

We are grateful to both Gurobi Optimizaton and MOSEK ApS for working closely with us to ensure that the use of their solvers with CVX is as seamless and straightforward as possible.

CVX 2.0 updated: Gurobi 5.1, MOSEK 7 with SDP support

We have been hard at work to exit the beta period for CVX 2.0. We’re almost there! However, due to some recent developments in the solver arena, we have decided to release a new build of CVX 2.0 beta today. We invite you to download a copy. Feel free to install this beta on top of your current version of CVX 2.0, but do re-run cvx_setup once you have done so.

Ordinarily, an update to a solver Gurobi or MOSEK would not require a new release of CVX. Gurobi 5.1 was released on January 8th, and the previous version of CVX 2.0 beta worked perfectly with that new release. If you’re content with your current version of CVX, there is no need to download the new build.

Mosek 7 adds support for semidefinite programs (SDPs), however, and this required some code changes to the Mosek solver shim. Previously, users who required an SDP-capable solver had to rely on the SDPT3 and SeDuMi solvers bundled with CVX. We are very pleased that now our users will have another new, commercially supported option for such problems now.

If you want to try the beta version of Mosek 7 now, head over to the beta section of their web site. There you can download a copy of MOSEK for your preferred platform, as well as a trial license that expires on March 1, 2013. Once you’ve installed MOSEK 7.0, add its Matlab MEX directory to your MATLAB path, and re-run cvx_setup.

Both Gurobi and MOSEK are excellent solvers, and the companies behind them have been wonderful to work with. It is a privilege for us to be able to support their use with CVX. In fact, we have some exciting new developments brewing on that front that we hope to share very soon. Stay tuned…