Create CVX model, and use repeatedly with multiple data sets

I’m currently solving a fairly large problem (287133 SeDuMi variables and 73678), which takes a few minutes to “compile”.

I want to solve 3000 of these, all with the same structure, and I would have expected there to be a way to pre-compile the problem and simply insert the different values into the constraints. However, a little searching hasn’t shown a way to do that.

Could someone please confirm that this is not possible? If it isn’t, is there a “wish list” that this could be added to?


This is not possible with CVX, as desirable as it might be.

Thanks for the prompt reply :slight_smile:

If (big if!) I were to try to add such a feature, how hard do you think it would be? Are there particular obvious obstacles, or just a mass of little ones? (If it is so infeasible I shouldn’t try, you can skip the rest of this post.)

A natural approach would be to allow the solver model to be output, annotated with which variables each of the constants comes from. I assume that would I’d have to create a new class containing the variable name and its value, and then re-implement all functions/operators to work on that class. Is that a reasonable approach?

A previous post pointed out that CVX is targeting convenience rather than speed, but if the range of problems it is fast enough for increases, that increases the convenience it provides …