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 supports the following solvers and problem types. To use a solver, you need to seperately install it along with the Python interface listed here.
This is what it looks like to solve a multidimensional mixed integer program with PICOS:
>>> import picos >>> P = picos.Problem() >>> x = picos.IntegerVariable("x", 2) >>> P.add_constraint(2*x <= 11) <2×1 Affine Constraint: 2·x ≤ > >>> P.set_objective("max", picos.sum(x)) >>> P.solve(solver="glpk") # Optional: Use GLPK as backend. <feasible primal solution (claimed optimal) from glpk> >>> P.value 10.0 >>> print(x) [ 5.00e+00] [ 5.00e+00]
You can head to the tutorial for more examples.
As of release 2.2, PICOS requires Python 3.4 or later.
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
|Distribution||Latest release||Latest version|
If you are packaging PICOS for additional systems, please let us know.
The PICOS source code can be found on GitLab. There are only two dependencies:
- Guillaume Sagnol has started work on PICOS in 2012.
- Maximilian Stahlberg is extending and co-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 | RSS feed
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.2.6.tar.gz (306.0 kB)||File type Source||Python version None||Upload date||Hashes View|