On this page:
SCS:   the Splitting Conic Solver
9.2

SCS: the Splitting Conic Solver🔗ℹ

bkc

This package provides Racket bindings for SCS, the Splitting Conic Solver. SCS solves large-scale convex cone programs — linear, quadratic, second-order, semidefinite, exponential, and power cone problems — using a first-order operator-splitting method.

The default API is high level and accepts ordinary Racket data:

(require scs)
 
(define result
  (solve #:A (scs:matrix 3 2  -1 1   1 0   0 1)
         #:b #(-1.0 0.3 -0.5)
         #:c #(-1.0 -1.0)
         #:cone (make-cone #:zero 1 #:positive 2)))
 
(scs-result-status result)   ; "solved"
(scs-result-x result)        ; #(0.3 -0.7)

The library is layered. Use scs (this module) for everyday work. scs/foreign is the contracted low-level wrapper layer, and scs/foreign/raw is the direct C FFI binding to the SCS C API. Solver workspaces are reclaimed by Racket’s garbage collector, so user code never frees anything.

The native library is the upstream scs build (3.2.11), compiled with LAPACK so semidefinite cones are available, and shipping both the direct (libscsdir) and indirect/CG (libscsindir) linear-system solvers.