Constraint

class picos.Constraint(typeOfConstraint, Id, Exp1, Exp2, Exp3=None, dualVariable=None, key=None)

A class for describing a constraint.

Exp1 = None

LHS

Exp2 = None

RHS (ignored for constraints of type lse and quad, where Exp2 is set to 0)

Exp3 = None

Second factor of the RHS for RScone constraints (see typeOfConstraint).

Id = None

An integer identifier

boundCons = None

stores list of bounds of the form (var,index,lower,upper)

delete()

deletes the constraint from Problem

dual

Value of the dual variable associated to this constraint

See the note on dual variables in the tutorial for more information.

exp3ConeVar = None

for a constraint of the form ||x||<u or ||x||^2<u v, stores x, u and v

key = None

A string to give a key name to the constraint

passed = None

list of solvers to which this constraints was already passed

semidefVar = None

for a constraint of the form X>>0, stores the semidef variable

slack

Value of the slack variable associated to this constraint (should be nonnegative/zero if the inequality/equality is satisfied: for an inequality of the type lhs<rhs, the slack is rhs-lhs, and for lhs>rhs the slack is lhs-rhs)

typeOfConstraint = None

A string from the following values, indicating the type of constraint:

  • lin<, lin= or lin> : Linear (in)equality Exp1 Exp2, Exp1 = Exp2 or Exp1 Exp2.
  • SOcone : Second Order Cone constraint ||Exp1|| < Exp2.
  • RScone : Rotated Cone constraint ||Exp1||**2 < Exp2 * Exp3.
  • lse : Geometric Programming constraint LogSumExp(Exp1)<0
  • quad: scalar quadratic constraint Exp1 < 0.
  • sdp< or sdp>: semidefinite constraint Exp1 Exp2 or Exp1 Exp2.
class picos.GeoMeanConstraint(expaff, expgeo, Ptmp, constring)

A temporary object used to pass geometric mean inequalities. This class derives from Constraint.

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.NormP_Constraint(expaff, expnorm, alpha, beta, Ptmp, constring)

A temporary object used to pass p-norm inequalities. This class derives from Constraint

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.NormPQ_Constraint(expaff, expnorm, p, q, Ptmp, constring)

A temporary object used to pass (p,q)-norm inequalities. This class derives from Constraint

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.TracePow_Constraint(exprhs, explhs, alpha, beta, M, Ptmp, constring)

A temporary object used to pass (trace of) pth power inequalities This class derives from Constraint

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.Flow_Constraint(G, Ptmp, constring)

A temporary object used to pass a flow constraint. This class derives from Constraint.

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.DetRootN_Constraint(exprhs, expdet, Ptmp, constring)

A temporary object used to pass nth root of determinant inequalities. This class derives from Constraint

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called

class picos.Sumklargest_Constraint(rhs, exp, k, eigenvalues, islargest, Ptmp, constring)

A temporary object used to pass constraints involving “sum of k largest elements”. This class derives from Constraint

prefix = None

prefix to be added to the names of the temporary variables when add_constraint() is called