dimod.ConstrainedQuadraticModel.set_lower_bound#
- ConstrainedQuadraticModel.set_lower_bound(v, lb)[source]#
Set the lower bound for a variable.
- Parameters:
v – Variable label of a variable in the constrained quadratic model.
lb – Lower bound to set for variable
v
.
- Raises:
ValueError – If
v
is aSPIN
orBINARY
variable.
Examples
>>> cqm = dimod.ConstrainedQuadraticModel() >>> cqm.add_variable('INTEGER', 'j', upper_bound=5) 'j' >>> cqm.set_lower_bound('j', 2)