SkillAgentSearch skills...

COSMO.jl

COSMO: Accelerated ADMM-based solver for convex conic optimisation problems (LP, QP, SOCP, SDP, ExpCP, PowCP). Automatic chordal decomposition of sparse semidefinite programs.

Install / Use

/learn @oxfordcontrol/COSMO.jl

README

<div style="display: flex; justify-content: flex-end" margin=0px> <img src="https://github.com/migarstka/COSMO_assets/blob/master/star_badge_3.png" align="right" width=6%> </div> <h1 align="center" margin=0px> <img src="https://github.com/migarstka/COSMO_assets/blob/master/cosmo_rocket_with_convex_set.png" width=70%> </h1> <p align="center"> <a href="https://github.com/oxfordcontrol/COSMO.jl/actions"><img src="https://github.com/oxfordcontrol/COSMO.jl/actions/workflows/ci.yml/badge.svg?branch=master"></a> <a href="https://codecov.io/gh/oxfordcontrol/COSMO.jl"><img src="https://codecov.io/gh/oxfordcontrol/COSMO.jl/branch/master/graph/badge.svg"></a> <a href="https://oxfordcontrol.github.io/COSMO.jl/stable"><img src="https://img.shields.io/badge/Documentation-stable-purple.svg"></a> <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/oxfordcontrol/COSMO.jl/releases"><img src="https://img.shields.io/badge/Release-v0.8.9-blue.svg"></a> </p> <p align="center"> <a href="# -features">Features</a> • <a href="# -installation">Installation</a> • <a href="CHANGELOG.md">Changelog</a> • <a href="# -citing-">Citing</a> • <a href="# -contributing">Contributing</a> </p>

This is a Julia implementation of the Conic operator splitting method (COSMO) solver. It can solve large convex conic optimization problems of the following form:

<p align="center"> <img src="https://github.com/migarstka/COSMO_assets/blob/master/cosmo_format.png" width=220px> </p>

with decision variables x ϵ R^n, s ϵ R^m and data matrices P=P'>=0, q ϵ R^n, A ϵ R^(m×n), and b ϵ R^m. The convex set K is a composition of convex sets and cones.

For more information take a look at the COSMO.jl Documentation (stable | dev).

⚙️ Features

  • Versatile: COSMO solves linear programs, quadratic programs, second-order cone programs, semidefinite programs and problems involving exponential and power cones
  • Quad SDPs: Positive semidefinite programs with quadratic objective functions are natively supported
  • Safeguarded acceleration: robust and faster convergence to higher precision using COSMOAccelerators
  • Infeasibility detection: Infeasible problems are detected without a homogeneous self-dual embedding of the problem
  • JuMP / Convex.jl support: We provide an interface to MathOptInterface (MOI), which allows you to describe your problem in JuMP and Convex.jl.
  • Warm starting: COSMO supports warm starting of the decision variables
  • Custom sets and linear solver: Customize COSMO's components by defining your own convex constraint sets and by choosing from a number of direct and indirect linear system solvers, for example, QDLDL, Pardiso, Conjugate Gradient and MINRES
  • Arbitrary precision types: You can solve problems with any floating point precision.
  • Open Source: Our code is free to use and distributed under the Apache 2.0 Licence
  • Chordal decomposition: COSMO tries to decompose large structured PSD constraints using chordal decomposition techniques. This often results in a significant speedup compared to the original problem.
  • Smart clique merging: After an initial decomposition of a structured SDP, COSMO recombines overlapping cliques/blocks to speed up the algorithm.
<div align="center" margin=0px> <img src="https://github.com/oxfordcontrol/COSMO.jl/blob/master/docs/src/assets/example_decomposition.gif" width=45%> </div>

⚡️ Installation

COSMO can be installed via the Julia package manager (type ]): pkg> add COSMO

🧪 Examples

Optimization problems appear in many applications such as power flow modelling, finance, control, and machine learning. We have collected a number of example problems in our documentation.

🎓 Citing

If you find COSMO useful in your project, we kindly request that you cite the following paper:

@Article{Garstka_2021,
  author  = {Michael Garstka and Mark Cannon and Paul Goulart},
  journal = {Journal of Optimization Theory and Applications},
  title   = {{COSMO}: A Conic Operator Splitting Method for Convex Conic Problems},
  volume  = {190},
  number  = {3},
  pages   = {779--810},
  year    = {2021},
  publisher = {Springer},
  doi     = {10.1007/s10957-021-01896-x},
  url     = {https://doi.org/10.1007/s10957-021-01896-x}
}

The article is available under Open Access here.

🤝 Contributing

This package is currently in maintenance mode. We are aiming to keep it compatible with new releases of JuMP/MOI. Helpful contributions are always welcome. Enhancement ideas are tagged as such in the Issues section.

  • How to get started with developing and testing this package is described in the documentation: How-to-develop.
  • Please report any issues or bugs that you encounter.
  • As an open source project we are also interested in any projects and applications that use COSMO. Please let us know by opening a GitHub issue or via email.

🐍 Python - Interface

COSMO can be called from Python. Take a look at: cosmo-python

🔍 Licence

This project is licensed under the Apache License - see the LICENSE.md file for details.

Related Skills

View on GitHub
GitHub Stars310
CategoryDevelopment
Updated11d ago
Forks45

Languages

Julia

Security Score

100/100

Audited on Mar 20, 2026

No findings