Implements SumExponentials.


class picos.expressions.exp_sumexp.SumExponentials(x, y=None)[source]

Bases: picos.expressions.expression.Expression

Sum of elementwise exponentials of an affine expression.


Let x be an n-dimensional real affine expression.

  1. If no additional expression y is given, this is the sum of elementwise exponentials

    \sum_{i = 1}^n \exp(\operatorname{vec}(x)_i).

  2. If an additional affine expression y of same shape as x is given, this is the sum of elementwise perspectives of exponentials

    \sum_{i = 1}^n \operatorname{vec}(y)_i \exp\left(


When you pose an upper bound t on a sum of elementwise exponentials, then PICOS enforces t \geq 0 through an auxiliary constraint during solution search. When an additional expression y is given, PICOS enforces y \geq 0 as well.

__init__(x, y=None)[source]

Construct a SumExponentials.

  • x (AffineExpression) – The affine expression x.

  • y (AffineExpression) – An additional affine expression y. If necessary, PICOS will attempt to reshape or broadcast it to the shape of x.

property log[source]

The logarithm of the expression.

property n

Length of x.

property x

The expression x.

property y

The additional expression y, or None.