Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Var.setAttr()
setAttr ( attrname, newvalue )
Set the value of a variable 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:
var.setAttr(GRB.attr.ub, 0.0) var.setAttr("ub", 0.0)