picos.modeling.footprint¶
Optimization problem description classes.
This module implements a footprint of a single problem, storing number and types of expressions and constraints, and the specification of a problem class.
Classes
- class picos.modeling.footprint.Footprint(recordsOrDict)[source]¶
Bases:
RecordTree
Statistics on an optimization problem.
- __init__(recordsOrDict)[source]¶
Construct a
Footprint
from raw data.See
picos.containers.RecordTree.__init__
. TheaddValues
argument is fixed; only variable and constraint paths are added.
- classmethod from_types(obj_dir, obj_func, vars=[], cons=[], nd_opts={})[source]¶
Create a footprint from collections of detailed types.
- Parameters
- Parm list(tuple) vars
A list of pairs of detailed variable type and occurence count.
- Parm list(tuple) cons
A list of pairs of detailed constraint type and occurence count.
- updated(recordsOrDict)[source]¶
Override
updated
.This method, just like
__init__
, does not take the additionaladdValues
argument.
- with_extra_options(**extra_options)[source]¶
Return a copy with additional solution search options applied.
- property continuous¶
Whether no integral variable type is present.
- property cost¶
A very rough measure on how expensive solving such a problem is.
This is logarithmic in the estimated size of the constraint matrix.
- property direction¶
Objective function optimization direction.
- property nonconvex_quadratic_objective[source]¶
Whether the problem has a nonconvex quadratic objective.
- property nondefault_options[source]¶
A dictionary mapping option names to their nondefault values.
Warning
This property is cached for performance reasons, do not modify any mutable option value (make a deep copy instead)!
- property objective¶
Detailed type of the objective function.
- class picos.modeling.footprint.Specification(objectives=None, variables=None, constraints=None, nondefault_options=None)[source]¶
Bases:
object
Representation of a mathematical class of optimization problems.