GRBGenConstr#
- GRBGenConstr#
Gurobi general constraint object. General constraints are always associated with a particular model. You create a general constraint object by adding a general constraint to a model (using one of the
GRBModel.AddGenConstr*
methods), rather than by using aGRBGenConstr
constructor.General constraint objects have a number of attributes, which can be queried with the
GRBGenConstr.Get
method. The full list can be found in the Attributes section of this document.- double Get(GRB.DoubleAttr attr)#
Query the value of a double-valued general constraint attribute.
- Parameters:
attr – The attribute being queried.
- Returns:
The current value of the requested attribute.
- int Get(GRB.IntAttr attr)#
Query the value of an int-valued general constraint attribute.
- Parameters:
attr – The attribute being queried.
- Returns:
The current value of the requested attribute.
- string Get(GRB.StringAttr attr)#
Query the value of a string-valued general constraint attribute.
- Parameters:
attr – The attribute being queried.
- Returns:
The current value of the requested attribute.
- void Set(GRB.DoubleAttr attr, string newvalue)#
Set the value of a double-valued general constraint attribute.
- Parameters:
attr – The attribute being modified.
newvalue – The desired new value of the attribute.
- void Set(GRB.IntAttr attr, string newvalue)#
Set the value of an int-valued general constraint attribute.
- Parameters:
attr – The attribute being modified.
newvalue – The desired new value of the attribute.
- void Set(GRB.StringAttr attr, string newvalue)#
Set the value of a string-valued general constraint attribute.
- Parameters:
attr – The attribute being modified.
newvalue – The desired new value of the attribute.