picos.settings

Contains global settings for PICOS.

All settings can be set via environment variables using the PICOS_ prefix, e.g. PICOS_SOLVER_WHITELIST='["cvxopt", "glpk"]' ./application.py would set SOLVER_WHITELIST to ["cvxopt", "glpk"] for this execution of application.py only. Safe evaluation is used to convert the given value to a Python object.

Applications that use PICOS may assign to these settings directly (silently overwriting any environment variable) but libraries that depend on PICOS should not do so as this would affect also applications and other libraries that use both PICOS and the library making the modificaiton.

Objects

picos.settings.ABSOLUTE_INTEGRALITY_TOLERANCE

Absolute tolerance used to validate integrality of integral variables.

Default value
0.0001
picos.settings.DEFAULT_CHARSET

Default charset to use for console output.

Can be any of "ascii", "latin1" or "unicode" (default).

Note that applications can change the charset at any time using the respective function in the glyphs module.

Default value
'unicode'
picos.settings.INTERNAL_OPTIONS

Solution search options used whenever PICOS solves a problem internally.

By default, this limits the solver used to CVXOPT for reproducibility and to avoid licensing issues when non-free solvers are installed.

This setting is given as a dictionary. For keys and possible values see Options.

Default value
{'solver': 'cvxopt'}
picos.settings.LICENSE_WARNINGS

Let solvers ignore verbosity settings to print licensing related warnings.

License warnings are only printed if both LICENSE_WARNINGS and the solution search option license_warnings are set to true, or if the verbosity setting allows solver output in general.

Default value
True
picos.settings.NONFREE_SOLVERS

Whether PICOS may perform solution search with proprietary solvers.

Default value
True
picos.settings.PREFER_GUROBI_MATRIX_INTERFACE

Whether to prefer Gurobi’s matrix interface when it is available.

This default can be overwritten by the gurobi_matint solver option.

Default value
True
picos.settings.RELATIVE_HERMITIANNESS_TOLERANCE

Relative tolerance used when checking whether a matrix is hermitian.

A matrix A \in \mathbb{C}^{n \times n} is considered numerically hermitian if

\max_{1 \leq i, j \leq n} |(A - A^H)_{ij}|
\leq
\varepsilon \max_{1 \leq i, j \leq n} |A_{ij}|

where \varepsilon is this tolerance.

Default value
1e-10
picos.settings.RELATIVE_SEMIDEFINITENESS_TOLERANCE

Relative tolerance used when checking if a matrix is positive semidefinite.

A hermitian matrix A \in \mathbb{C}^{n \times n} is considered numerically positive semidefinite if

\min \operatorname{eigvals}(A)
\geq
-\varepsilon \max \left( \{ 1 \} \cup \operatorname{eigvals}(A) \right)

where \varepsilon is this tolerance.

Default value
1e-10
picos.settings.RETURN_SOLUTION

Whether solve returns a Solution.

Default value
True
picos.settings.SOLVER_BLACKLIST

A list of names of solvers that PICOS considers to be not available.

Default value
[]
picos.settings.SOLVER_WHITELIST

A list of names of solvers; PICOS considers all others not available.

Default value
[]
picos.settings.UNRELIABLE_STRATEGIES

Whether to pass solvers problems that they are known to struggle with.

This allows all problem/solver combinations that are skipped by “PICOS’ choice”.

Default value
False
picos.settings.WARN_MISSING_DOCSTRINGS

Whether to warn about missing docstrings for top level objects in a module.

Must be set via an environment variable to have an effect.

Default value
False