Title: | Splitting Conic Solver |
---|---|
Description: | Solves convex cone programs via operator splitting. Can solve: linear programs ('LPs'), second-order cone programs ('SOCPs'), semidefinite programs ('SDPs'), exponential cone programs ('ECPs'), and power cone programs ('PCPs'), or problems with any combination of those cones. 'SCS' uses 'AMD' (a set of routines for permuting sparse matrices prior to factorization) and 'LDL' (a sparse 'LDL' factorization and solve package) from 'SuiteSparse' (<https://people.engr.tamu.edu/davis/suitesparse.html>). |
Authors: | Florian Schwendinger [aut, cre], Brendan O'Donoghue [aut, cph], Balasubramanian Narasimhan [aut], Timothy A. Davis [cph], Patrick R. Amestory [cph], Iain S. Duff [cph] |
Maintainer: | Florian Schwendinger <[email protected]> |
License: | GPL-3 |
Version: | 3.2.4 |
Built: | 2024-11-13 06:30:54 UTC |
Source: | CRAN |
Solves convex cone programs via operator splitting.
scs(A, b, obj, P = NULL, cone, initial = NULL, control = scs_control())
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 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 | |
number of primal zero cones (dual free cones), | |
which corresponds to the primal equality constraints | ||||
l |
integer | |
number of linear cones (non-negative cones) | |
bsize |
integer | |
size of box cone | |
bl |
numeric | |
lower limit for box cone | |
bu |
numeric | |
upper limit for box cone | |
q |
integer | |
vector of second-order cone sizes | |
s |
integer | |
vector of positive semidefinite cone sizes | |
ep |
integer | |
number of primal exponential cones | |
ed |
integer | |
number of dual exponential cones | |
p |
numeric | |
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
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
Details to the control parameters.
scs_control( max_iters = 100000L, eps_rel = 1e-04, eps_abs = 1e-04, eps_infeas = 1e-07, alpha = 1.5, rho_x = 1e-06, scale = 0.1, verbose = FALSE, normalize = TRUE, warm_start = FALSE, acceleration_lookback = 0L, acceleration_interval = 1L, adaptive_scale = TRUE, write_data_filename = NULL, log_csv_filename = NULL, time_limit_secs = 0 )
scs_control( max_iters = 100000L, eps_rel = 1e-04, eps_abs = 1e-04, eps_infeas = 1e-07, alpha = 1.5, rho_x = 1e-06, scale = 0.1, verbose = FALSE, normalize = TRUE, warm_start = FALSE, acceleration_lookback = 0L, acceleration_interval = 1L, adaptive_scale = TRUE, write_data_filename = NULL, log_csv_filename = NULL, time_limit_secs = 0 )
max_iters |
an integer giving the maximum number of iterations (default is |
eps_rel |
a double specifying relative feasibility tolerance (default |
eps_abs |
a double specifying absolute feasibility tolerance (default |
eps_infeas |
a double specifying infeasibility tolerance (primal and dual) (default |
alpha |
a double giving the (Douglas-Rachford) over-relaxation parameter, allowed values are in (0, 2) (default |
rho_x |
a double giving the momentum of x term (default os |
scale |
a double giving the factor (default is |
verbose |
a logical giving if the progress should be printed (default is |
normalize |
a logical giving if heuristic data rescaling should be used (default is |
warm_start |
a logical indicating if a warm_start is provided (default |
acceleration_lookback |
an integer indicating How much memory to use for Anderson acceleration. More memory requires more time to compute but can give more reliable steps (default |
acceleration_interval |
an integer specifying the number of iterations for which Anderson acceleration is run (default |
adaptive_scale |
a logical indicating whether to heuristically adapt dual through the solve (default |
write_data_filename |
a string indicating filename to write problem data to (default |
log_csv_filename |
a string indicating filename where SCS will write csv logs of various quantities through the solver (default |
time_limit_secs |
a double indicating time limit for solve run in seconds; can be fractional (default |
a list containing the control parameters.