SOL Logo

Systems Optimization Laboratory

Stanford University
Dept of Management Science and Engineering (MS&E)

Huang Engineering Center

Stanford, CA 94305-4121  USA

Freely Available Optimization Software


The following software packages are provided by SOL under the terms of the OSI Common Public License (CPL). The software may alternatively be used under the terms of a BSD License (BSDlicense.txt).


  • SYMMLQ: Fortran, MATLAB, and Python software for sparse symmetric linear equations \(Ax = b\), where \(A\) is definite or indefinite. (Iterative method. Allows a positive-definite preconditioner.)

  • MINRES: Fortran, MATLAB, and Python software for sparse symmetric linear equations \(Ax = b\), where \(A\) is definite or indefinite, possibly singular. (Iterative method. Allows a positive-definite preconditioner.)

  • MINRES-QLP: MATLAB software for sparse symmetric linear equations \(Ax = b\) or least-squares problems \( \min \|Ax - b\| \), where \(A\) is definite or indefinite, possibly singular. (Iterative method. Allows a positive-definite preconditioner. For singular systems, computes the minimum-norm solution.)

  • cgLanczos: MATLAB software for sparse symmetric positive-definite linear equations \(Ax = b\). (Iterative method; Lanczos-based implementation of CG, the conjugate-gradient method.) Special feature: Returns an estimate of the diagonals of \( A^{-1} \).

  • LSQR: MATLAB, Fortran, C, C++, .NET, and Python software for sparse linear equations and sparse least squares. (Iterative method; more stable than symmetric conjugate-gradient method on normal equations. Allows positive "damping".) Special feature: Returns an estimate of the diagonals of \( (A^T A)^{-1} \).

  • LSMR: MATLAB, Python, and Fortran 90 software for sparse linear equations and sparse least squares. (Iterative method; more stable than MINRES on normal equations. Allows positive "damping".) Special feature: Both \( \|r\| \) and \( \|A^T r\| \) decrease monotonically. For LSQR, only \( \|r\| \) is monotonic.

  • CGLS: MATLAB software for sparse linear equations and sparse least squares. (Iterative method; more stable than symmetric conjugate-gradient method on normal equations.) Special feature: Allows positive or negative "damping" (although negative is potentially unstable).

  • CRAIG: MATLAB software for under-determined sparse linear equations \( Ax=b \). Returns the minimum-length solution.

  • covLSQR: MATLAB software for sparse linear equations and sparse least squares, derived from LSQR. Special feature: Can estimate any principal submatrix of the covariance matrix \( (A^T A)^{-1} \).

  • LSRN: Python and C++ (with MATLAB interface) software for strongly over-determined or under-determined, possibly rank-deficient, linear least squares.

  • LUSOL: Fortran and MATLAB software for maintaining a sparse square or rectangular factorization \(A = LU\). (Suitable as a basis factorization package for sparse simplex method.)

  • LUMOD: Fortran software for updating a dense square factorization \(LC = U\) when rows and columns of \(C\) are added, deleted or replaced. (Suitable as basis factorization package for dense simplex method, or for updating sparse factorizations via the Schur-complement (Block-LU) method.)

  • PDCO: MATLAB software for sparse linear programming, least squares, or convex optimization subject to linear constraints \(Ax=b\), \(l \le x \le u\). This includes NNLS (non-negative least squares). PDCO uses a primal-dual interior method. Special feature: \(A\) may be a sparse matrix or a function for computing \(Ax\) and \(A^Ty\).

  • PDSCO: Superseded by PDCO.

  • PNOPT: MATLAB solver that uses proximal Newton-type methods to minimize composite functions (the sum of a smooth and a nonsmooth function)