picos

The picos namespace gives you quick access to the most important classes and functions for optimizing with PICOS, so that import picos is often sufficient for implementing your model. You can find additional utilities in the picos.tools namespace.

Functions

ascii()

Let PICOS create future string representations using only ASCII characters.

ball(r[, p])

returns a Ball object representing:

default_charset([rebuildDerivedGlyphs])

Let PICOS create future string representations using unicode characters.

detrootn(exp)

returns a DetRootN_Exp object representing the determinant of the n th-root of the symmetric matrix exp, where n is the dimension of the matrix.

diag(exp[, dim])

if exp is an affine expression of size (n,m), diag(exp,dim) returns a diagonal matrix of size dim*n*m \times dim*n*m, with dim copies of the vectorized expression exp[:] on the diagonal.

diag_vect(exp)

Returns the vector with the diagonal elements of the matrix expression exp

exp(x)

Exponentiation of a PICOS, CVXOPT, NumPy, or numeric expression.

expcone()

returns a ExponentialCone object representing the set \operatorname{closure}\ \{(x,y,z): y>0, y\exp(x/y)\leq z \}

flow_Constraint(G, f, source, sink, flow_value)

Constructs a network flow constraint.

geomean(exp)

returns a GeoMeanExp object representing the geometric mean of the entries of exp[:].

get_version_info()

import_cbf(filename)

Imports the data from a CBF file, and creates a Problem object.

kron(A, B)

Kronecker product of 2 expression, at least one of which must be constant

kullback_leibler(x[, y])

A shorthand for KullbackLeibler.

lambda_max(exp)

largest eigenvalue of a square matrix expression (cf.

lambda_min(exp)

smallest eigenvalue of a square matrix expression (cf.

latin1([rebuildDerivedGlyphs])

Let PICOS create future string representations using ISO 8859-1 characters.

log(x)

The logarithm of a PICOS, CVXOPT, NumPy, or numeric expression.

logsumexp(exp)

A shorthand for LogSumExp.

lse(exp)

A shorthand for LogSumExp.

new_param(name, value)

Declare a parameter for the problem, that will be stored as a cvxopt sparse matrix.

norm(exp[, num, denom])

returns a NormP_Exp object representing the (generalized-) p-norm of the entries of exp[:].

partial_trace(X[, k, dim])

Partial trace of an Affine Expression, with respect to the k th subsystem for a tensor product of dimensions dim.

partial_transpose(exp[, dims_1, subsystems, …])

Partial transpose of an Affine Expression, with respect to given subsystems.

simplex([gamma])

returns a TruncatedSimplex object representing the set \{x\geq 0: ||x||_1 \leq \gamma \}.

sum(lst[, it, indices])

This is a replacement for Python’s sum that produces sensible string representations when summing PICOS expressions.

sum_k_largest(exp, k)

returns a Sum_k_Largest_Exp object representing the sum of the k largest elements of an affine expression exp.

sum_k_largest_lambda(exp, k)

returns a Sum_k_Largest_Exp object representing the sum of the k largest eigenvalues of a square matrix affine expression exp.

sum_k_smallest(exp, k)

returns a Sum_k_Smallest_Exp object representing the sum of the k smallest elements of an affine expression exp.

sum_k_smallest_lambda(exp, k)

returns a Sum_k_Smallest_Exp object representing the sum of the k smallest eigenvalues of a square matrix affine expression exp.

sumexp(x[, y])

A shorthand for SumExponential.

trace(exp)

trace of a square AffinExp

tracepow(exp[, num, denom, coef])

Returns a TracePow_Exp object representing the trace of the pth-power of the symmetric matrix exp, where exp is an AffinExp which we denote by X.

truncated_simplex([gamma, sym])

returns a TruncatedSimplex object representing the set:

unicode([rebuildDerivedGlyphs])

Let PICOS create future string representations using unicode characters.

Classes

DualizationError(msg)

Exception raised when a non-standard conic problem is being dualized.

NonConvexError(msg)

Exception raised when non-convex quadratic constraints are passed to a solver which cannot handle them.

NotAppropriateSolverError(msg)

Exception raised when trying to solve a problem with a solver which cannot handle it

Problem(**options)

PICOS’ representation of an optimization problem.

QuadAsSocpError(msg)

Exception raised when the problem can not be solved in the current form, because quad constraints are not handled.

new_problem

alias of picos.problem.Problem

Variables

LOCATION

str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

VERSION_FILE

str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str