cvxpy / cvxpy

A Python-embedded modeling language for convex optimization problems.
https://www.cvxpy.org
Apache License 2.0
5.33k stars 1.05k forks source link

Take advantage of power cones in atom canonicalization #1223

Open rileyjmurray opened 3 years ago

rileyjmurray commented 3 years ago

Some cvxpy atoms are approximately canonicalized via collections of SOC constraints, when they could be represented exactly by power cones. Support for power cone constraints was added in #1211, but that PR didn't modify or create new atoms.

We should look at revising our current canonicalization of power-cone-representable atoms, including geo_mean, pnorm, and power, which have downstream uses in harmonic_mean, inv_prod, and mixed_norm. Right now the (approximate) canonicalizations of these atoms is managed by functions in cvxpy/utilities/power_tools.py.

I think the natural way to do this is to rewrite all of these atoms to use PowCone3D constraints, and then to add in a new reduction that replaces a given PowCone3D constraint by an approximation obtained with several SOC constraints. At the same time, we could consider adding a reduction that replaces a PowCone3D constraint with an equivalent pair of ExpCone constraints (this would have the effect of allowing ECOS to avoid approximate reformulations via SOC constraints).

akshayka commented 3 years ago

Riley, that approach sounds very natural indeed! Totally on board with it, provided that Steven agrees.

SteveDiamond commented 3 years ago

That's fine with me!