0

I'm using the CVX modeling system in MATLAB. I would like to solve a series of problems where the structure/format of the optimization problem remains the same, but the value of specific parameters changes.

This answer states that CVXPY (for the Python programming language) allows you to specify parameters for this purpose. Using parameters can make solving times "substantially faster" than repeatedly solving new problems from scratch. More information is in the CVXPY Python documentation.

I can't find any similar functionality in the CVX MATLAB documentation. Does CVX have parameters similar to CVXPY?

  • did you profile the problem in Matlab? does it indeed takes the internal problem generating takes 20 s and main optimization runtime takes 0.2 s? I dont recall an issue in getting the first step taking longer that the second one in matlab... – bla Sep 21 '22 at 17:34
  • CVX and CVXPY are separate, different tools written by different groups of people in very different eras, so speaking of CVXPY as a "Python version" of CVX is far off the truth. More to the point, CVX does not have such capability. You should check YALMIP with it's "optimizer" object if you really need something like that. – Michal Adamaszek Sep 22 '22 at 06:43
  • @bla I have not performed profiling yet. However, if there's an established method to speed up computations, I'd prefer to start with that than refactor the code later. – Inquisitive Sep 22 '22 at 18:41
  • @MichalAdamaszek I'd be happy to accept your comment as an answer if you convert it to one. Thank you for the clarification about CVX and CVXPY. Given that both were developed by students from Stephen Boyd's lab and both perform disciplined convex programming, it was difficult for me to tell what the relationship between the two is. I will edit my question however. – Inquisitive Sep 22 '22 at 18:42

0 Answers0