scs | R Documentation |
Solves convex cone programs via operator splitting.
scs(A, b, obj, P = NULL, cone, initial = NULL, control = scs_control())
A |
a matrix of constraint coefficients. NOTE: The rows of matrix A have to be ordered according to the order given in subsection “Allowed cone parameters”. For more information see README. |
b |
a numeric vector giving the primal constraints |
obj |
a numeric vector giving the primal objective |
P |
a symmetric positive semidefinite matrix, default |
cone |
a list giving the cone sizes |
initial |
a named list (warm start solution) of three elements: |
control |
a list giving the control parameters. For more information see README. |
The order of the rows in matrix A has to correspond to the order given in
the table “Cone Arguments”, which means means rows corresponding to
primal zero cones should be first, rows corresponding to non-negative cones second,
rows corresponding to second-order cone third, rows corresponding to positive semidefinite cones fourth,
rows corresponding to exponential cones fifth and rows corresponding to power cones at last.
linear programs (LPs)
second-order cone programs (SOCPs)
semidefinite programs (SDPs)
exponential cone programs (ECPs)
power cone programs (PCPs)
problems with any combination of cones, which can be defined by the parameters listed in the subsection “Allowed cone parameters”
Parameter | Type | Length | Description | |
z | integer | 1 | number of primal zero cones (dual free cones), | |
which corresponds to the primal equality constraints | ||||
l | integer | 1 | number of linear cones (non-negative cones) | |
bsize | integer | 1 | size of box cone | |
bl | numeric | bsize-1 | lower limit for box cone | |
bu | numeric | bsize-1 | upper limit for box cone | |
q | integer | ≥q1 | vector of second-order cone sizes | |
s | integer | ≥q1 | vector of positive semidefinite cone sizes | |
ep | integer | 1 | number of primal exponential cones | |
ed | integer | 1 | number of dual exponential cones | |
p | numeric | ≥q1 | vector of primal/dual power cone parameters |
list of solution vectors x, y, s and information about run
A <- matrix(c(1, 1), ncol=1) b <- c(1, 1) obj <- 1 cone <- list(z = 2) control <- list(eps_rel = 1e-3, eps_abs = 1e-3, max_iters = 50) sol <- scs(A = A, b = b, obj = obj, cone = cone, control = control) sol
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.