6.4 Power Cone 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. 11 (Problem Formulation and Solutions) for detailed formulations). Here we discuss how to set-up problems with the primal/dual power cones.

MOSEK supports the primal and dual power cones, defined as below:

  • Primal power cone:

    \[\POW_n^{\alpha_k} = \left\{ x\in \real^n ~:~ \prod_{i=0}^{n_\ell-1} x_i^{\beta_i} \geq \sqrt{\sum_{j=n_\ell}^{n-1}x_j^2},\ x_0\ldots,x_{n_\ell-1}\geq 0 \right\}\]

    where \(s = \sum_i \alpha_i\) and \(\beta_i = \alpha_i / s\), so that \(\sum_i \beta_i=1\).

  • Dual power cone:

    \[(\POW_n^{\alpha_k}) = \left\{ x\in \real^n ~:~ \prod_{i=0}^{n_\ell-1} \left(\frac{x_i}{\beta_i}\right)^{\beta_i} \geq \sqrt{\sum_{j=n_\ell}^{n-1}x_j^2},\ x_0\ldots,x_{n_\ell-1}\geq 0 \right\}\]

    where \(s = \sum_i \alpha_i\) and \(\beta_i = \alpha_i / s\), so that \(\sum_i \beta_i=1\).

Perhaps 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.\]

which has the corresponding dual cone:

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\).

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

6.4.1 Example POW1

Consider the following optimization problem which involves powers of variables:

(6.9)\[\begin{split}\begin{array} {lrcl} \mbox{maximize} & x_0^{0.2}x_1^{0.8} + x_2^{0.4} - x_0 & & \\ \mbox{subject to} & x_0+x_1+\frac12 x_2 & = & 2, \\ & x_0,x_1,x_2 & \geq & 0. \end{array}\end{split}\]

We convert (6.9) into affine conic form using auxiliary variables as bounds for the power expressions:

(6.10)\[\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,1.0,x_4) & \in & \POW_3^{0.4,0.6}. \end{array}\end{split}\]

The two conic constraints shown in (6.10) can be expressed in the ACC form as shown in (6.11):

(6.11)\[\begin{split}\left[\begin{array}{ccccc}1&0&0&0&0\\0&1&0&0&0\\0&0&0&1&0\\0&0&1&0&0\\0&0&0&0&0\\0&0&0&0&1\end{array}\right] \left[\begin{array}{c}x_0\\x_1\\x_2\\x_3\\x_4\end{array}\right] + \left[\begin{array}{c}0\\0\\0\\0\\1\\0\end{array}\right] \in \POW^{0.2,0.8}_3 \times \POW^{0.4,0.6}_3.\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

To define the conic constraints, we start by setting prob$F equal to the matrix shown in (6.11). Note that F will internally be converted to the sparse triplet form (dgTMatrix) but the user may directly construct it as such by setting giveCsparse=FALSE (or repr="T" for newer Matrix package versions) in the sparseMatrix call. The vector prob$g is also set to the value shown in (6.11). Lastly, the domains are specified as columns in a list-typed matrix called cones, with rows for each associated detail. In example (6.10) we have two conic constraints:

    # NOTE: The F matrix is internally stored in the sparse
    #       triplet form. Use 'giveCsparse' or 'repr' option 
    #       in the sparseMatrix() call to construct the F 
    #       matrix directly in the sparse triplet form. 
    prob$F     <- sparseMatrix(i=c(1, 2, 3, 4, 6),
                               j=c(1, 2, 4, 3, 5), 
                               x=c(1, 1, 1, 1, 1), 
                               dims = c(6,5))
    prob$g     <- c(0, 0, 0, 0, 1, 0)
    prob$cones <- matrix(list(), nrow=3, ncol=2)
    rownames(prob$cones) <- c("type","dim","conepar")

    prob$cones[,1] <- list("PPOW", 3, c(0.2, 0.8))
    prob$cones[,2] <- list("PPOW", 3, c(0.4, 0.6))

The first row in prob$cones selects the "type" of cone, i.e. the power cone "MSK_DOMAIN_PRIMAL_POWER_CONE" (note that PPOW and PRIMAL_POWER_CONE are valid aliases). The second row specifies the dimension ("dim") of each domain, here set to 3. The third row selects the cone parameters ("conepar") where each entry is a vector of parameter values.

Source code

Listing 6.5 Source code solving problem (6.9). Click here to download.
library("Rmosek")

pow1 <- function()
{
    # Specify the non-conic part of the problem.
    prob <- list(sense="max")
    prob$c  <- c(-1, 0, 0, 1, 1)
    prob$A  <- Matrix(c(1, 1, 0.5, 0, 0), nrow=1, sparse=TRUE)
    prob$bc <- rbind(blc=2, 
                     buc=2)
    prob$bx <- rbind(blx=c(rep(-Inf,5)), 
                     bux=c(rep( Inf,5)))
    
    # Specify the affine conic constraints.
    # NOTE: The F matrix is internally stored in the sparse
    #       triplet form. Use 'giveCsparse' or 'repr' option 
    #       in the sparseMatrix() call to construct the F 
    #       matrix directly in the sparse triplet form. 
    prob$F     <- sparseMatrix(i=c(1, 2, 3, 4, 6),
                               j=c(1, 2, 4, 3, 5), 
                               x=c(1, 1, 1, 1, 1), 
                               dims = c(6,5))
    prob$g     <- c(0, 0, 0, 0, 1, 0)
    prob$cones <- matrix(list(), nrow=3, ncol=2)
    rownames(prob$cones) <- c("type","dim","conepar")

    prob$cones[,1] <- list("PPOW", 3, c(0.2, 0.8))
    prob$cones[,2] <- list("PPOW", 3, c(0.4, 0.6))

    # Solve the problem
    r <- mosek(prob)

    # Return the solution
    stopifnot(identical(r$response$code, 0))
    r$sol
}

pow1()