scs_control: SCS Control Arguments

View source: R/scs.R

scs_controlR Documentation

SCS Control Arguments

Description

Details to the control parameters. The defaults are those of the bundled SCS C library (see scs_version), except verbose, which is FALSE here.

Usage

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 = 10L,
  acceleration_interval = 5L,
  adaptive_scale = TRUE,
  write_data_filename = NULL,
  log_csv_filename = NULL,
  time_limit_secs = 0,
  adaptive_diag_scale = TRUE,
  acceleration_type_1 = TRUE,
  acceleration_regularization = 1e-08,
  acceleration_relaxation = 1
)

Arguments

max_iters

an integer giving the maximum number of iterations (default is 100000L).

eps_rel

a double specifying relative feasibility tolerance (default 1e-4).

eps_abs

a double specifying absolute feasibility tolerance (default 1e-4).

eps_infeas

a double specifying infeasibility tolerance (primal and dual) (default 1e-7).

alpha

a double giving the (Douglas-Rachford) over-relaxation parameter, allowed values are in (0, 2) (default 1.5).

rho_x

a double giving the primal scale factor (default 1e-6).

scale

a double giving the initial dual scale factor (default 0.1), updated during the solve if adaptive_scale is TRUE.

verbose

a logical giving if the progress should be printed (default is FALSE).

normalize

a logical giving if heuristic data rescaling should be used (default is TRUE).

warm_start

a logical indicating if a warm_start is provided (default FALSE; a call to scs with a non-null initial argument overrides it to be effectively TRUE).

acceleration_lookback

a non-negative integer giving how much memory to use for Anderson acceleration (AA). More memory requires more time to compute but can give more reliable steps; 0L disables acceleration (default 10L). The AA type is chosen by acceleration_type_1; a negative value, which earlier SCS versions read as a request for type-II AA, is an error.

acceleration_interval

an integer; AA is applied every acceleration_interval iterations (default 5L).

adaptive_scale

a logical indicating whether to heuristically adapt the dual scale through the solve (default TRUE).

write_data_filename

a string indicating filename to write problem data to (default NULL indicating no write).

log_csv_filename

a string indicating filename where SCS will write csv logs of various quantities through the solver (default NULL indicating no logging, as it makes the solver much slower).

time_limit_secs

a double indicating time limit for solve run in seconds; can be fractional (default 0.0 indicating no limit).

adaptive_diag_scale

a logical indicating whether to refine the scaling metric per row from the primal residual profile; requires adaptive_scale and is silently disabled without it (default TRUE).

acceleration_type_1

a logical; TRUE selects type-I AA, FALSE type-II, which is more stable but typically slower and is usually run with a smaller acceleration_regularization such as 1e-12 (default TRUE).

acceleration_regularization

a double giving the Tikhonov regularization of the AA least-squares solve. A positive value is scaled by the Frobenius norms of the AA matrices, a negative value pins the absolute regularization at -acceleration_regularization, and 0 disables regularization (default 1e-8).

acceleration_relaxation

a double in [0, 2] giving the AA relaxation factor; 1.0 is vanilla AA (default 1.0).

Value

a list containing the control parameters.


scs documentation built on Nov. 28, 2026, 5:06 p.m.