7.4 Conic Exponential Optimization

The structure of a typical conic optimization problem is

\[\begin{split}\begin{array}{lccccl} \mbox{minimize} & & & c^T x+c^f & & \\ \mbox{subject to} & l^c & \leq & A x & \leq & u^c, \\ & l^x & \leq & x & \leq & u^x, \\ & & & Fx+g & \in & \D, \end{array}\end{split}\]

(see Sec. 12 (Problem Formulation and Solutions) for detailed formulations). Here we discuss how to set-up problems with the primal/dual exponential cones.

MOSEK supports two exponential cones, namely:

  • Primal exponential cone:

    \[\EXP = \left\lbrace x \in \real^3: x_0 \geq x_1 \exp(x_2/x_1),\ x_0,x_1\geq 0 \right\rbrace.\]
  • Dual exponential cone:

    \[\EXP^* = \left\lbrace s \in \real^3: s_0 \geq -s_2 e^{-1} \exp(s_1/s_2),\ s_2\leq 0,s_0\geq 0 \right\rbrace.\]

For example, consider the following constraint:

\[(x_4, x_0, x_2) \in \EXP\]

which describes a convex cone in \(\real^3\) given by the inequalities:

\[x_4 \geq x_0\exp(x_2/x_0),\ x_0,x_4\geq 0.\]

For other types of cones supported by MOSEK, see Sec. 14.9 (Supported domains) and the other tutorials in this chapter. Different cone types can appear together in one optimization problem.

7.4.1 Example CEO1

Consider the following basic conic exponential problem which involves some linear constraints and an exponential inequality:

(7.6)\[\begin{split}\begin{array} {lrcl} \mbox{minimize} & x_0 + x_1 & & \\ \mbox{subject to} & x_0+x_1+x_2 & = & 1, \\ & x_0 & \geq & x_1\exp(x_2/x_1), \\ & x_0, x_1 & \geq & 0. \end{array}\end{split}\]

The affine conic form of (7.6) is:

(7.7)\[\begin{split}\begin{array} {lrcl} \mbox{minimize} & x_0 + x_1 & & \\ \mbox{subject to} & x_0+x_1+x_2 & = & 1, \\ & Ix & \in & \EXP, \\ & x & \in & \real^3. \end{array}\end{split}\]

where \(I\) is the \(3\times 3\) identity matrix.

We start by creating the optimization model:

with Model('ceo1') as M:

We then define the variable x.

    x = M.variable('x', 3, Domain.unbounded())

The linear constraint is defined using the sum operator Expr.sum:

    # Create the constraint
    #      x[0] + x[1] + x[2] = 1.0
    M.constraint("lc", Expr.sum(x), Domain.equalsTo(1.0))

The conic exponential constraint in this case is very simple as it involves just the variable x. The primal exponential cone is referred to via Domain.inPExpCone, and it must be applied to a variable of length 3 or an array of such variables. Note that this is a basic way of defining conic constraints, and that in practice they would have more complicated structure.

    # Create the conic exponential constraint
    expc = M.constraint("expc", x, Domain.inPExpCone())

We only need the objective function:

    # Set the objective function to (x[0] + x[1])
    M.objective("obj", ObjectiveSense.Minimize, Expr.sum(x[0:2]))

Calling the Model.solve method invokes the solver:

    M.solve()

The primal and dual solution values can be retrieved using Variable.level, Constraint.level and Variable.dual, Constraint.dual, respectively:

    # Get the linear solution values
    solx = x.level()
    # Get conic solution of expc
    expcval  = expc.level()
    expcdual = expc.dual()
Listing 7.4 Fusion implementation of model (7.6). Click here to download.
from mosek.fusion import *
import mosek.fusion.pythonic

with Model('ceo1') as M:

    x = M.variable('x', 3, Domain.unbounded())

    # Create the constraint
    #      x[0] + x[1] + x[2] = 1.0
    M.constraint("lc", Expr.sum(x), Domain.equalsTo(1.0))

    # Create the conic exponential constraint
    expc = M.constraint("expc", x, Domain.inPExpCone())

    # Set the objective function to (x[0] + x[1])
    M.objective("obj", ObjectiveSense.Minimize, Expr.sum(x[0:2]))

    # Solve the problem
    M.solve()

    M.writeTask("ceo1.ptf")

    # Get the linear solution values
    solx = x.level()
    print('x1,x2,x3 = %s' % str(solx))

    # Get conic solution of expc
    expcval  = expc.level()
    expcdual = expc.dual()
    print('expc levels                = %s' % str(expcval))
    print('expc dual conic var levels = %s' % str(expcdual))