socp(A, b, c, kvec, type = rep('q',length(kvec)), use_sparse=TRUE, gamma_fac=.95, delta0 = .75, sigma0 = .25, mu0 = 0.01, zero_tol = 1e-6, max_iter = 100, min_progress = zero_tol/100)
A
is a matrix containing the coefficients for the linear and second order cone constraints. A
should have $m$ rows, where $m$ is the number of constraints. The number of columns in A
should be sum(kvec)
b
is a vector containing the affine terms of the constraints.c
is a vector containing the coefficients of the objective function to be minimized.kvec
is a vector containing the length of each constraint block.type
is a vector of the same length as kvec
containing the type of each constraint block. Possible values are "q" for second order cone blocks or "l" for linear blocks.use_sparse
indicates whether or not to use sparse matrices (via the Matrix package) for computations.gamma_fac
is used to calculate gamma (see Chi and Liu, 2009) by gamma <- gamma_fac*min(1,1/nrm_H)
zero_tol
is not reached.c - t(A)%*%y
. See Chi and Liu, 2009.sum(c*x)
while the constraints are A%*%x == b
, with x
belonging to the cartesian product of second order cones described by kvec
and type
.#Load an example SOCP
data(prob)
#Solve the socp
soln <- socp(prob$A, prob$b, prob$c, dim(prob$A)[2])
Run the code above in your browser using DataLab