6.4 Power Cone Optimization

The structure of a typical conic optimization problem is

minimizecTx+cfsubject tolcAxuc,lxxux,Fx+gD,

(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:

    Pnαk={xRn : i=0n1xiβij=nn1xj2, x0,xn10}

    where s=iαi and βi=αi/s, so that iβi=1.

  • Dual power cone:

    (Pnαk)={xRn : i=0n1(xiβi)βij=nn1xj2, x0,xn10}

    where s=iαi and βi=αi/s, so that iβi=1.

Perhaps the most important special case is the three-dimensional power cone family:

P3α,1α={xR3:x0αx11α|x2|, x0,x10}.

which has the corresponding dual cone:

For example, the conic constraint (x,y,z)P30.25,0.75 is equivalent to x0.25y0.75|z|, or simply xy3z4 with x,y0.

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)maximizex00.2x10.8+x20.4x0subject tox0+x1+12x2=2,x0,x1,x20.

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

(6.10)maximizex3+x4x0subject tox0+x1+12x2=2,(x0,x1,x3)P30.2,0.8,(x2,1.0,x4)P30.4,0.6.

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

(6.11)[100000100000010001000000000001][x0x1x2x3x4]+[000010]P30.2,0.8×P30.4,0.6.

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()