Constraint

class Constraint(quadratic_program, name, sense, rhs)[source]

Abstract Constraint Class.

Initializes the constraint.

Parameters
  • quadratic_program (Any) – The parent QuadraticProgram.

  • name (str) – The name of the constraint.

  • sense (ConstraintSense) – The sense of the constraint.

  • rhs (float) – The right-hand-side of the constraint.

Attributes

Constraint.name

Returns the name of the constraint.

Constraint.quadratic_program

Returns the parent QuadraticProgram.

Constraint.rhs

Returns the right-hand-side of the constraint.

Constraint.sense

Returns the sense of the constraint.

Methods

Constraint.evaluate(x)

Evaluate left-hand-side of constraint for given values of variables.