Caching the workspace and warm-starts

SCS supports reusing the workspace between solves so long as the data matrices \(A\) and \(P\) do not change. After an initial solve the workspace can be updated with new \(b\) and \(c\) vectors if desired. This can substantially speed up subsequent solve times since we can cache important quantities such as the matrix factorization and the data equilibration. Moreover, SCS supports warm-starting the solver with a guess of the solution, which can significantly reduce the total number of iterations required for convergence.

Re-using the workspace and warm-starting can be useful, for example, when solving a sequence of related problems such as in Model predictive control or solving for the entire regularization path in the the Lasso.

In the C API call scs_init once to initialize the workspace, then use the scs_solve in conjunction with scs_update to solve a sequence of problems. Warm-starting can be done by setting the warm-start setting to True when calling scs_solve, and then including the guess of the solution in the x, y, s members of the Solution struct, where those members correspond to the guess of the solution in the standard form. SCS will initialize the solver at those points and then overwrite the Solution struct members with the real solution at termination.

In other languages caching the workspace and warm-starting is documented in their respective Interfaces.