6.4 Power Cone Optimization

Conic optimization is a generalization of linear optimization, allowing constraints of the type

\[x^t \in \K_t,\]

where \(x^t\) is a subset of the problem variables and \(\K_t\) is a convex cone. Since the set \(\real^n\) of real numbers is also a convex cone, we can simply write a compound conic constraint \(x\in \K\) where \(\K=\K_1\times\cdots\times\K_l\) is a product of smaller cones and \(x\) is the full problem variable.

MOSEK can solve conic optimization problems of the form

\[\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, \\ & & & x \in \K, & & \end{array}\end{split}\]

where the domain restriction, \(x \in \K\), implies that all variables are partitioned into convex cones

\[x = (x^0, x^1, \ldots , x^{p-1}),\quad \mbox{with } x^t \in \K_t \subseteq \real^{n_t}.\]

In this tutorial we describe how to use the power cone. The primal power cone of dimension \(n\) with parameter \(0<\alpha<1\) is defined as:

\[\POW_n^{\alpha,1-\alpha} = \left\lbrace x \in \real^n: x_0^\alpha x_1^{1-\alpha}\geq\sqrt{\sum_{i=2}^{n-1}x_i^2},\ x_0,x_1\geq 0 \right\rbrace.\]

In particular, the most important special case is the three-dimensional power cone family:

\[\POW_3^{\alpha,1-\alpha} = \left\lbrace x \in \real^3: x_0^\alpha x_1^{1-\alpha}\geq |x_2|,\ x_0,x_1\geq 0 \right\rbrace.\]

For example, the conic constraint \((x,y,z)\in\POW_3^{0.25,0.75}\) is equivalent to \(x^{0.25}y^{0.75}\geq |z|\), or simply \(xy^3\geq z^4\) with \(x,y\geq 0\).

MOSEK also supports the dual power cone:

\[\left(\POW_n^{\alpha,1-\alpha}\right)^{*} = \left\lbrace x \in \real^n: \left(\frac{x_0}{\alpha}\right)^\alpha \left(\frac{x_1}{1-\alpha}\right)^{1-\alpha}\geq\sqrt{\sum_{i=2}^{n-1}x_i^2},\ x_0,x_1\geq 0 \right\rbrace.\]

For other types of cones supported by MOSEK see Sec. 6.3 (Conic Quadratic Optimization), Sec. 6.5 (Conic Exponential Optimization), Sec. 6.6 (Semidefinite Optimization). See Task.appendcone for a list and definitions of available cone types. Different cone types can appear together in one optimization problem.

Furthermore, each variable may belong to one cone at most. The constraint \(x_i - x_j = 0\) would however allow \(x_i\) and \(x_j\) to belong to different cones with same effect.

6.4.1 Example POW1

Consider the following optimization problem which involves powers of variables:

(6.7)\[\begin{split}\begin{array} {lrcl} \mbox{maximize} & x^{0.2}y^{0.8} + z^{0.4} - x & & \\ \mbox{subject to} & x+y+\frac12 z & = & 2, \\ & x,y,z & \geq & 0. \end{array}\end{split}\]

With \((x,y,z)=(x_0,x_1,x_2)\) we convert it into conic form using auxiliary variables as bounds for the power expressions:

(6.8)\[\begin{split}\begin{array} {lrcl} \mbox{maximize} & x_3 + x_4 - x_0 & & \\ \mbox{subject to} & x_0+x_1+\frac12 x_2 & = & 2, \\ & (x_0,x_1,x_3) & \in & \POW_3^{0.2,0.8}, \\ & (x_2,x_5,x_4) & \in & \POW_3^{0.4,0.6}, \\ & x_5 & = & 1. \end{array}\end{split}\]

Setting up the linear part

The linear parts (constraints, variables, objective) are set up using exactly the same methods as for linear problems, and we refer to Sec. 6.1 (Linear Optimization) for all the details. The same applies to technical aspects such as defining an optimization task, retrieving the solution and so on.

Setting up the conic constraints

A cone is defined using the function Task.appendcone:

      int[][] csub = { {0, 1, 3}, {2, 5, 4}};
      task.appendcone(mosek.conetype.ppow, 0.2, csub[0]);
      task.appendcone(mosek.conetype.ppow, 0.4, csub[1]);

The first argument selects the type of power cone, that is conetype.ppow. The second argument is the cone parameter \(\alpha\). The remaining arguments list the variables which form the cone. Variants of this method are available to append multiple cones at a time.

The code below produces the answer of (6.7) which is

[ 0.06389298  0.78308564  2.30604283 ]

Source code

Listing 6.5 Source code solving problem (6.7). Click here to download.
package com.mosek.example;

import mosek.*;

public class pow1 {
  static final int numcon = 1;
  static final int numvar = 6;

  public static void main (String[] args) throws java.lang.Exception {
    // Since the value infinity is never used, we define
    // 'infinity' symbolic purposes only
    double infinity = 0;

    mosek.boundkey[] bkx = new mosek.boundkey[numvar];
    double[] blx         = new double[numvar];
    double[] bux         = new double[numvar];    

    double[] val   = { 1.0, 1.0, -1.0 };
    int[]    sub   = { 3, 4, 0 };

    double[] aval  = { 1.0, 1.0, 0.5 };
    int[]    asub  = { 0, 1, 2 };

    int i;
    double[] xx  = new double[numvar];

    // create a new environment object
    try (Env  env  = new Env();
         Task task = new Task(env, 0, 0)) {
      // Directs the log task stream to the user specified
      // method task_msg_obj.stream
      task.set_Stream(
        mosek.streamtype.log,
        new mosek.Stream()
      { public void stream(String msg) { System.out.print(msg); }});

      /* Append 'numcon' empty constraints.
         The constraints will initially have no bounds. */
      task.appendcons(numcon);

      /* Append 'numvar' variables.
         The variables will initially be fixed at zero (x=0). */
      task.appendvars(numvar);

      /* Define the linear part of the problem */
      task.putclist(sub, val);
      task.putarow(0, asub, aval);
      task.putconbound(0, mosek.boundkey.fx, 2.0, 2.0);
      for(i=0;i<5;i++) {
        bkx[i] = mosek.boundkey.fr;
        blx[i] = -infinity;
        bux[i] = infinity;
      }
      bkx[5] = mosek.boundkey.fx;
      blx[5] = bux[5] = 1.0;
      task.putvarboundslice(0, numvar, bkx, blx, bux);

      /* Add a conic constraint */
      int[][] csub = { {0, 1, 3}, {2, 5, 4}};
      task.appendcone(mosek.conetype.ppow, 0.2, csub[0]);
      task.appendcone(mosek.conetype.ppow, 0.4, csub[1]);

      task.putobjsense(mosek.objsense.maximize);

      System.out.println ("optimize");
      /* Solve the problem */
      mosek.rescode r = task.optimize();
      System.out.println (" Mosek warning:" + r.toString());
      // Print a summary containing information
      // about the solution for debugging purposes
      task.solutionsummary(mosek.streamtype.msg);

      mosek.solsta solsta[] = new mosek.solsta[1];

      /* Get status information about the solution */
      task.getsolsta(mosek.soltype.itr, solsta);

      task.getxx(mosek.soltype.itr, // Interior solution.
                 xx);

      switch (solsta[0]) {
        case optimal:
          System.out.println("Optimal primal solution\n");
          for (int j = 0; j < 3; ++j)
            System.out.println ("x[" + j + "]:" + xx[j]);
          break;
        case dual_infeas_cer:
        case prim_infeas_cer:
          System.out.println("Primal or dual infeasibility.\n");
          break;
        case unknown:
          System.out.println("Unknown solution status.\n");
          break;
        default:
          System.out.println("Other solution status");
          break;
      }
    } catch (mosek.Exception e) {
      System.out.println ("An error/warning was encountered");
      System.out.println (e.toString());
      throw e;
    }
  }
}