conelp(c, G, h[, dims[, A, b[, primalstart[, dualstart[, kktsolver]]]]])
Solves a pair of primal and dual cone programs
The primal variables are x and s. The dual variables are y and z. The
inequalities are interpreted as s C, z
C, where C is a cone defined as
a Cartesian product of a nonnegative orthant, a number of second-order
cones, and a number of positive semidefinite cones:
with
In this definition, vec(u) denotes a symmetric matrix u stored as a vector in column major order. The structure of C is specified by dims. This argument is a dictionary with three fields.
The default value of dims is {’l’: G.size[0], ’q’: [], ’s’: []}, i.e., by default the inequality is interpreted as a componentwise vector inequality.
The arguments c, h and b are real single-column dense matrices. G and A are real dense or sparse matrices. The number of rows of G and h is equal to
The columns of G and h are vectors in
where the last N components represent symmetric matrices stored in column major order. The strictly upper triangular entries of these matrices are not accessed (i.e., the symmetric matrices are stored in the ’L’-type column major order used in the blas and lapack modules). The default values for A and b are matrices with zero rows, meaning that there are no equality constraints.
primalstart is a dictionary with keys ’x’ and ’s’, used as an optional primal starting point. primalstart[’x’] and primalstart[’s’] are real dense matrices of size (n,1) and (K,1), respectively, where n is the length of c. The vector primalstart[’s’] must be strictly positive with respect to the cone C.
dualstart is a dictionary with keys ’y’ and ’z’, used as an optional dual starting point. dualstart[’y’] and dualstart[’z’] are real dense matrices of size (p,1) and (K,1), respectively, where p is the number of rows in A. The vector dualstart[’s’] must be strictly positive with respect to the cone C.
The role of the optional argument kktsolver is explained in section 7.7.
conelp() returns a dictionary that contains the result and information about the accuracy of the solution. The most important fields have keys ’status’, ’x’, ’s’, ’y’, ’z’. The ’status’ field is a string with possible values ’optimal’, ’primal infeasible’, ’dual infeasible’ and ’unknown’. The meaning of the ’x’, ’s’, ’y’, ’z’ fields depends on the value of ’status’.
The other entries in the output dictionary summarize the accuracy with which these optimality conditions are satisfied. The fields ’primal objective’, ’dual objective’, and ’gap’ give the primal objective cTx, dual objective -hTz - bTy, and the gap sTz. The field ’relative gap’ is the relative gap, defined as
and None otherwise. The fields ’primal infeasibility’ and ’dual infeasibility’ are the residuals in the primal and dual equality constraints, defined as
respectively.
The field ’residual as primal infeasibility certificate’ gives the residual
The field ’residual as dual infeasibility certificate’ gives the residual
if hTz + bTy < 0, and None otherwise. A small value of this residual indicates that y and z, divided by -hTz - bTy, are an approximate proof of primal infeasibility. The field ’residual as dual infeasibility certificate’ is defined as
if cTx < 0, and as None otherwise. A small value indicates that x and s, divided by -cTx are an approximate proof of dual infeasibility.
It is required that
where p is the number or rows of A and n is the number of columns of G and A.
As an example we solve the problem
Only the entries of G and h defining the lower triangular portions of the coefficients in the linear matrix inequalities are accessed. We obtain the same result if we define G and h as below.