Concepts
Features
Reference
Gurobi general constraint object. General constraints are alwaysassociated with a particular model. You create a general constraintobject by adding a constraint to a model (using one of theGRBModel::addGenConstr*methods), rather than by using aGRBGenConstr constructor.
The methods on general constraint objects are used to get and setgeneral constraint attributes. For example, general constraint types canbe queried by callingget (GRB_IntAttr_GenConstrType).Note, however, that it is generally more efficient to query attributesfor a set of constraints at once. This is done using the attribute querymethod on theGRBModel object (GRBModel::get).
The full list of attributescan be found in theAttributes section of thisdocument. Examples of how to query and set attributes can also be foundinthis section.
Query the value of a general constraint attribute.
attr – The attribute being queried.
The current value of the requested attribute.
Set the value of a general constraint attribute.
attr – The attribute being modified.
newvalue – The desired new value of the attribute.
Help and Feedback