picos.expressions.exp_sumexp

Implements SumExponentials.

Classes

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

Bases: Expression

Sum of elementwise exponentials of an affine expression.

Definition

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(
\frac{\operatorname{vec}(x)_i}{\operatorname{vec}(y)_i}\right).

Warning

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.

__add__(other)[source]

Denote addition with another expression on the right-hand side.

__init__(x, y=None)[source]

Construct a SumExponentials.

Parameters
  • 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.

__le__(other)[source]

Return a constraint that the expression is upper-bounded.

__mul__(other)[source]

Denote scaling from the right hand side.

__radd__(other)[source]

Denote addition with another expression on the left-hand side.

__rmul__(other)[source]

Denote scaling from the left hand side.

__truediv__(other)[source]

Denote division by a constant scalar.

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.