A Python interface to conic optimization solvers.
A Python Interface to Conic Optimization Solvers
PICOS allows you to enter a mathematical optimization problem as a high level model, with painless support for (complex) vector and matrix variables and multidemensional algebra. Your model will be transformed to the standard form understood by an appropriate solver that is available at runtime. This makes your application portable as users have the choice between several commercial and open source solvers.
PICOS runs under both Python 2 and Python 3 and supports the following solvers and problem types. To use a solver, you need to seperately install it along with the Python interface listed here.
¹ only geometric programming, ² experimental
This is what it looks like to solve a multidimensional mixed integer program with PICOS:
>>> import picos >>> P = picos.Problem() >>> x = P.add_variable("x", 2, vtype="integer") >>> C = P.add_constraint(x <= 5.5) >>> P.set_objective("max", 1|x) # 1|x is the sum over x >>> solution = P.solve() >>> print(solution["status"]) 'integer optimal solution' >>> print(P.obj_value()) 10.0 >>> print(x) [ 5.00e+00] [ 5.00e+00] >>> print(C.slack) [ 5.00e-01] [ 5.00e-01]
Documentation & Source
- The full documentation can be browsed online or downloaded in PDF form.
- The API documentation without the tutorial and examples is also available as a separate PDF.
- The source code lives on GitLab.
If you are using pip you can run
pip install picos to get the latest version.
If you are using Anaconda you can run
conda install -c picos picos to get the latest version.
Via your system's package manager
If you are packaging PICOS for additional systems, please tell us so we can list your package here!
- Guillaume Sagnol is PICOS' initial author and primary developer since 2012.
- Maximilian Stahlberg is extending and maintaining PICOS since 2017.
PICOS is free and open source software and available to you under the terms of the GNU GPL v3.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size PICOS-2.0.0.tar.gz (236.6 kB)||File type Source||Python version None||Upload date||Hashes View|