Introduction¶
PICOS is a user friendly Python API to several conic and integer programming solvers, designed to be used by both application developers and researchers as well as instructors teaching courses on mathematical optimization. It allows you to enter an optimization problem as a high level model, with painless support for (complex) vector and matrix variables and multidimensional 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.
Features¶
PICOS supports the following solvers and problem types. To use a solver, you need to separately install it along with the Python interface listed here.
Solver

Python
interface

License



included 
Yes 
Yes 
Yes 
nonfree 

native 
Yes 
Yes 
Yes 

Yes 
Yes 
Yes 
Yes 

Yes 
Yes 

included 
Yes 
Yes 
Yes 
nonfree 

included 
Yes 
Yes 
Yes 
Yes 
nonfree 

native 
Yes 

Yes 
Yes 
Yes 

native 
Yes 
Example
This is what it looks like to solve a multidimensional mixed integer program with PICOS:
>>> import picos as pc
>>> P = pc.Problem()
>>> x = pc.IntegerVariable("x", 2)
>>> P += 2*x <= 11
>>> P.maximize = pc.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 our quick examples or the tutorial for more.
Installation¶
As of release 2.2, PICOS requires Python 3.4 or later.
Via pip
If you are using pip you can run
pip install picos
to get the latest version.
Via Anaconda
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 major version 
Latest version 

Arch Linux 
If you are packaging PICOS for additional platforms, please let us know.
From source
The PICOS source code can be found on GitLab. There are only two dependencies:
Documentation¶
The full documentation can be browsed online or downloaded in PDF form.
Credits¶
Developers
Guillaume Sagnol has started work on PICOS in 2012.
Maximilian Stahlberg is extending and comaintaining PICOS since 2017.
Contributors
For an uptodate list of all code contributors, please refer to the contributors page. Should a reference from before 2019 be unclear, see also the old contributors page on GitHub.
Citing¶
A submission to the Journal of Open Source Software is in review.
License¶
PICOS is free and open source software and available to you under the terms of the GNU GPL v3.