qiskit_addon_opt_mapper.problems.Constraint¶
- class Constraint(optimization_problem, name, sense, rhs)[source]¶
 Bases:
OptimizationProblemElementAbstract Constraint Class.
Initializes the constraint.
- Parameters:
 
Methods
__init__(optimization_problem, name, sense, rhs)Initializes the constraint.
evaluate(x)Evaluate left-hand-side of constraint for given values of variables.
Attributes
Returns the name of the constraint.
Returns the parent OptimizationProblem.
Returns the right-hand-side of the constraint.
Returns the sense of the constraint.
- property optimization_problem: OptimizationProblem¶
 Returns the parent OptimizationProblem.
- Returns:
 The parent OptimizationProblem.
- property rhs: float¶
 Returns the right-hand-side of the constraint.
- Returns:
 The right-hand-side of the constraint.
- property sense: ConstraintSense¶
 Returns the sense of the constraint.
- Returns:
 The sense of the constraint.