picos.modeling.file_in

Functions for reading optimization problems from a file.

Outline

Functions

import_cbf

Create a Problem from a CBF file.

Functions

import_cbf

picos.modeling.file_in.import_cbf(filename)[source]

Create a Problem from a CBF file.

The created problem contains one (multidimensional) variable for each cone specified in the section VAR of the .cbf file, and one (multidimmensional) constraint for each cone specified in the sections CON and PSDCON.

Returns

A tuple (P, x, X, params) where

  • P is the imported picos Problem object,

  • x is a list of multidimensional variables representing the scalar variables found in the file,

  • X is a list of symmetric variables representing the positive semidefinite variables found in the file, and

  • params is a dictionary containing PICOS cosntants used to define the problem. Indexing is with respect to the blocks of variables as defined in the sections VAR and CON of the file.