Attributes#
The primary mechanism for querying and modifying properties of a Gurobi model is through the attribute interface. A variety of different attributes are available. Some are only populated at certain times (e.g., those related to the solution of a model), while others are available at all times (e.g., the number of variables in the model). Attributes can be associated with variables (e.g., lower bounds), constraints (e.g., the right-hand side), SOSs (e.g., IIS membership), or with the model as a whole (e.g., the objective value for the current solution).
The Attribute Types section lists all attributes, grouped by their type.
The Attribute Examples section provides code snippets showing how to work with attributes in each language API.
The Attribute Reference provides the full detail of each attribute’s usage and purpose.