1+ """
2+ AGEBridge{T,F,G,H} <: MOI.Bridges.Constraint.AbstractBridge
3+
4+ The nonnegativity of `x ≥ 0` in
5+ ```
6+ ∑ ci x^αi ≥ -c0 x^α0
7+ ```
8+ can be reformulated as
9+ ```
10+ ∑ ci exp(αi'y) ≥ -β exp(α0'y)
11+ ```
12+ In any case, it is shown to be equivalent to
13+ ```
14+ ∃ ν ≥ 0 s.t. D(ν, exp(1)*c) ≤ β, ∑ νi αi = α0 ∑ νi [CP16, (3)]
15+ ```
16+ where `N(ν, λ) = ∑ νj log(νj/λj)` is the relative entropy function.
17+ The constant `exp(1)` can also be moved out of `D` into
18+ ```
19+ ∃ ν ≥ 0 s.t. D(ν, c) - ∑ νi ≤ β, ∑ νi αi = α0 ∑ νi [MCW21, (2)]
20+ ```
21+ The relative entropy cone in MOI is `(u, v, w)` such that `D(w, v) ≥ u`.
22+ Therefore, we can either encode `(β, exp(1)*c, ν)` [CP16, (3)] or
23+ `(β + ∑ νi, c, ν)` [MCW21, (2)].
24+ In this bridge, we use the second formulation.
25+
26+ !!! note
27+ A direct application of the Arithmetic-Geometric mean inequality gives
28+ ```
29+ ∃ ν ≥ 0 s.t. D(ν, exp(1)*c) ≤ -log(-β), ∑ νi αi = α0, ∑ νi = 1 [CP16, (4)]
30+ ```
31+ which is not jointly convex in (ν, c, β).
32+ The key to get the convex formulation [CP16, (3)] or [MCW21, (2)] instead is to
33+ use the convex conjugacy between the exponential and the negative entropy functions [CP16, (iv)].
34+
35+ [CP16] Chandrasekaran, Venkat, and Parikshit Shah.
36+ "Relative entropy relaxations for signomial optimization."
37+ SIAM Journal on Optimization 26.2 (2016): 1147-1173.
38+ [MCW21] Murray, Riley, Venkat Chandrasekaran, and Adam Wierman.
39+ "Signomial and polynomial optimization via relative entropy and partial dualization."
40+ Mathematical Programming Computation 13 (2021): 257-295.
41+ https://arxiv.org/pdf/1907.00814.pdf
42+
43+
44+ """
145struct AGEBridge{T,F,G,H} <: MOI.Bridges.Constraint.AbstractBridge
246 k:: Int
347 equality_constraints:: Vector{MOI.ConstraintIndex{F,MOI.EqualTo{T}}}
448 relative_entropy_constraint:: MOI.ConstraintIndex{G,MOI.RelativeEntropyCone}
5- end # See https://arxiv.org/pdf/1907.00814.pdf
49+ end
650
751function MOI. Bridges. Constraint. bridge_constraint (
852 :: Type{AGEBridge{T,F,G,H}} ,
@@ -14,19 +58,17 @@ function MOI.Bridges.Constraint.bridge_constraint(
1458 ν = MOI. add_variables (model, m - 1 )
1559 sumν = MOI. ScalarAffineFunction (MOI. ScalarAffineTerm .(one (T), ν), zero (T))
1660 ceq = map (1 : size (set. α, 2 )) do var
17- f = - sumν
61+ f = zero ( typeof ( sumν))
1862 j = 0
1963 for i in 1 : m
20- if i != set. k
64+ if i == set. k
65+ MA. sub_mul!! (f, convert (T, set. α[i, var]), sumν)
66+ else
2167 j += 1
2268 MA. add_mul!! (f, convert (T, set. α[i, var]), ν[j])
2369 end
2470 end
25- return MOI. Utilities. normalize_and_add_constraint (
26- model,
27- f,
28- MOI. EqualTo (zero (T)),
29- )
71+ return MOI. add_constraint (model, f, MOI. EqualTo (zero (T)))
3072 end
3173 scalars = MOI. Utilities. eachscalar (func)
3274 f = MOI. Utilities. operate (
0 commit comments