QConstr.setAttr()

setAttr ( attrname, newvalue )

Set the value of a quadratic constraint attribute. Note that attribute changes are handled in a lazy fashion. The effect of a change isn't visible until the next call to Model.update or Model.optimize.

The full list of available attributes can be found in the Attributes section.

Arguments:

attrname: The attribute being modified.

newvalue: The desired new value of the attribute.

Example usage:

  constr.setAttr(GRB.attr.qcrhs, 0.0)
  constr.setAttr("qcrhs", 0.0)