Two convex problems one inside the other

The first rule of convex optimization is that it is applied to convex optimization problems. Is your problem convex?

At its heart, it appears that battery involves the product of two optimization expressions. Having one of these expressions be the output of a function (find_u) does not change that fundamental fact. Creating a function as you have is not a valid way of skirting CVX’s DCP rules, which your program violates.

I don’t completely understand your problem, so am not 100% ruling out that it can be formulated for CVX. But until you show otherwise, i am assessing it to be non-convex.

1 Like