socp {CLSOCP}  R Documentation 
Solves Second Order Cone Programs (SOCP) using the one step smoothing Newton method of Chi and Liu.
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 = 1e6, max_iter = 100, min_progress = zero_tol/100)
A 

b 

c 

kvec 

type 

use_sparse 

gamma_fac 

delta0 
A parameter affecting the behavior of the algorithm. See Chi and Liu, 2009. 
sigma0 
A parameter affecting the behavior of the algorithm. See Chi and Liu, 2009. 
mu0 
A parameter affecting the behavior of the algorithm. See Chi and Liu, 2009. 
zero_tol 
The threshold for completion of the algorithm. See Chi and Liu, 2009. 
max_iter 
The maximum number of allowed iterations if 
min_progress 
The minimum progress that must be made on each iteration to continue execution. 
A second order cone program (SOCP) is an optimization problem similar to a linear program (LP), except that some variables can be constrained by second order cones. An exact mathematical definition can be found in Chi and Liu, 2009. This function implements the algorithm given in that paper. The algorithm has been extended here to allow for multiple second order cone constraints as well as linear constraints. The objective function is given by 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
.
A list containing named elements:
x 
The optimal solution to the SOCP. See details. 
y 
The dual solution. See Chi and Liu, 2009. 
s 
Given by 
obj 
The value of the objective for the optimal solution. 
code 
The status of the result. 0 indicates that the function completed with no problems. 1 indicates that a singularity occured. 2 indicates termination due to lack of progress. 3 indicates termination due to the maximum number of iterations being reached. Only solutions with a code of 0 should be relied upon. 
mu 
The final value of the smoothing parameter. See Chi and Liu, 2009. 
iter 
The number of iterations performed. 
No attempt is made to check the feasibility of the SOCP. Infeasible inputs may result in unexpected behavior, although usually they will result in a failure code.
Jason Rudy
Chi and Liu. A onestep smoothing Newton method for secondorder cone programming. Journal of Computational and Applied Mathematics (2009) vol. 223 (1) pp. 114123
#Load an example SOCP data(prob) #Solve the socp soln < socp(prob$A, prob$b, prob$c, dim(prob$A)[2])