MathOptInterface.jl icon indicating copy to clipboard operation
MathOptInterface.jl copied to clipboard

Add n-dimensional PowerCone

Open odow opened this issue 10 months ago • 2 comments

@lkapelevich and @HFriberg have been emailing me about the upcoming CBF v4, https://cblib.zib.de/doc/format4.pdf, which proposes to add an n-dimensional PowerCone.

We've talked about this somewhat before: https://github.com/jump-dev/MathOptInterface.jl/issues/977

There are two proposed variants (plus their dual cones).

I have no strong feelings on which ones (if any) we should adopt. But I'd like to somewhat reign in having a litany of very similar cones.

Radial

Image

Hypograph

Image

Clarabel

Clarabel has native support for the radial with the restriction that $\sigma=1$ https://clarabel.org/stable/api_cone_types/

Image

Hypatia

Hypatia has both https://jump.dev/Hypatia.jl/stable/api/cones/#Hypatia.Cones.GeneralizedPower and https://jump.dev/Hypatia.jl/stable/api/cones/#Hypatia.Cones.HypoPowerMean

Mosek

Mosek has support for radial: https://docs.mosek.com/latest/capi/alphabetic-functionalities.html#mosek.task.appendprimalpowerconedomain

Image

odow avatar Feb 17 '25 01:02 odow

Exponent vector All implementations require a normalized vector of exponents, $\sum_i \alpha_i = 1$, so the only difference is whether you try to assert on this floating-point relation using code such as in Clarabel:

@assert isapprox(sum(α),one(DefaultFloat), atol=eps()*length(α)/2)

or you simply rescale whatever you get in

α = α ./ sum(α)

The latter option avoids a critical loss in precision already at the modeling stage, as the user can input [1, 1, 1], rather than some [0.3333, 0.3333, 0.3333], thereby letting the solver decide on the precision of the decimal expansion.

Radial or hypograph? The boring fact that the Radial variant is supported in all mentioned solvers, means that there should be strong arguments for choosing something else. But for completeness, I want to mention that I have seen three variants

(x^a * y^b * z^c)^(1/(a+b+c)) > t > 0
(x^a * y^b * z^c)^(1/(a+b+c)) > |t|
(x^a * y^b * z^c)^(1/(a+b+c)) > t

In the former two, you can move the power to the other side (e.g., x^a * y^b * z^c > |t|^(a+b+c)) which is nice cognitive simplification from a modeling perspective, as something like t > x^7 is easily recognized as t * 1^6 > x^7 . In contrast, I have yet to find an example where the negative range of t is natural and useful.

HFriberg avatar Feb 17 '25 10:02 HFriberg

We discussed this on today's developer call. We're happy to add the radial power cone if it is supported by CBF and Mosek.

odow avatar Feb 27 '25 21:02 odow