Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# Attribute Types

The following tables list the full set of Gurobi attributes. The attributes have been grouped by associated modeling object. Attributes associated with the model take scalar values. So do attributes associated with solution quality, objectives in multi-objective models, scenarios in multi-scenario models, and batches. Attributes associated with variables, linear constraints, SOS constraints, quadratic constraints, and general constraints contain one entry per variable or constraint in the model. The APIs provide methods to query attribute values for individual constraints or variables, or to query their values for arrays of constraints or variables (refer to our Attribute Examples section for examples). Array queries are generally more efficient.

Note that the attributes that provide solution quality information have been split off into a separate table at the end of this section. These attributes are also associated with the model as a whole.

Some solution attributes require information that is only computed by certain Gurobi algorithms. Such cases are noted in the detailed attribute descriptions that follow. For example, the VBasis and CBasis attributes can only be queried when a simplex basis is available (a basis is available when a continuous model has been solved using primal simplex, dual simplex, or barrier with crossover). Sensitivity information (SAObjLow, SAObjUp, etc.) is also only available for basic solutions.

Entries in the tables below link to the full detail of each attribute’s usage and purpose in the Attribute Reference.

Model attributes:

These attributes provide information about the overall model (as opposed to information about individual variables or constraints in the model).

Attribute name | Description
--- | ---
NumVars | Number of variables
NumConstrs | Number of linear constraints
NumSOS | Number of SOS constraints
NumQConstrs | Number of quadratic constraints
NumGenConstrs | Number of general constraints
NumNZs | Number of non-zero coefficients in the constraint matrix
DNumNZs | Number of non-zero coefficients in the constraint matrix (in double format)
NumQNZs | Number of non-zero quadratic objective terms
NumQCNZs | Number of non-zero terms in quadratic constraints
NumIntVars | Number of integer variables
NumBinVars | Number of binary variables
NumPWLObjVars | Number of variables with piecewise-linear objective functions
ModelName | Model name
ModelSense | Model sense (minimization or maximization)
ObjCon | Constant offset for objective function
Fingerprint | Model fingerprint
ObjVal | Objective value for current solution
ObjBound | Best available objective bound (lower bound for minimization, upper bound for maximization)
ObjBoundC | Best available objective bound, without rounding (lower bound for minimization, upper bound for maximization)
PoolObjBound | Bound on best objective for solutions not in pool (lower bound for minimization, upper bound for maximization)
PoolNObjVal | Objective value of alternatives solutions stored during the optimization process
MIPGap | Current relative MIP optimality gap
Runtime | Runtime for most recent optimization
Work | Work spent on most recent optimization
MemUsed | Current amount (in GB) of memory allocated
MaxMemUsed | Maximum amount (in GB) of memory ever allocated
Status | Current optimization status
SolCount | Number of stored solutions
IterCount | Number of simplex iterations performed in most recent optimization
BarIterCount | Number of barrier iterations performed in most recent optimization
PDHGIterCount | Number of PDHG iterations performed in most recent optimization
NodeCount | Number of branch-and-cut nodes explored in most recent optimization
OpenNodeCount | Number of open branch-and-cut nodes at the end of most recent optimization
ConcurrentWinMethod | Winning method of most recent concurrent optimization of continuous model
IsMIP | Indicates whether the model is a MIP
IsQP | Indicates whether the model is a QP/MIQP
IsQCP | Indicates whether the model is a QCP/MIQCP
IsMultiObj | Indicates whether the model has multiple objectives
IISMinimal | Indicates whether the current IIS is minimal
MaxCoeff | Maximum constraint matrix coefficient (in absolute value)
MinCoeff | Minimum (non-zero) constraint matrix coefficient (in absolute value)
MaxBound | Maximum finite variable bound
MinBound | Minimum finite variable bound
MaxObjCoeff | Maximum linear objective coefficient (in absolute value)
MinObjCoeff | Minimum (non-zero) linear objective coefficient (in absolute value)
MaxRHS | Maximum constraint right-hand side (in absolute value)
MinRHS | Minimum (non-zero) constraint right-hand side (in absolute value)
MaxQCCoeff | Maximum quadratic constraint matrix coefficient of quadratic part (in absolute value)
MinQCCoeff | Minimum (non-zero) quadratic constraint matrix coefficient of quadratic part (in absolute value)
MaxQCLCoeff | Maximum quadratic constraint matrix coefficient in linear part (in absolute value)
MinQCLCoeff | Minimum (non-zero) quadratic constraint matrix coefficient in linear part (in absolute value)
MaxQCRHS | Maximum quadratic constraint right-hand side (in absolute value)
MinQCRHS | Minimum (non-zero) quadratic constraint right-hand side (in absolute value)
MaxQObjCoeff | Maximum quadratic objective coefficient (in absolute value)
MinQObjCoeff | Minimum (non-zero) quadratic objective coefficient (in absolute value)
Kappa | Estimated basis condition number
KappaExact | Exact basis condition number
FarkasProof | Magnitude of infeasibility violation in Farkas infeasibility proof
TuneResultCount | Number of improved parameter sets found by tuning tool
NumStart | Number of MIP starts
LicenseExpiration | License expiration date

Variable attributes:

These attributes provide information that is associated with specific variables.

Attribute name | Description
--- | ---
LB | Lower bound
UB | Upper bound
Obj | Linear objective coefficient
VType | Variable type (continuous, binary, integer, etc.)
VarName | Variable name
VTag | Variable tag
X | Value in the current solution
PoolNX | Value in a sub-optimal MIP solution
RC | Reduced cost
BarX | Value in the best barrier iterate (before crossover)
Start | MIP start value (for constructing an initial MIP solution)
VarHintVal | MIP hint value
VarHintPri | MIP hint priority
BranchPriority | Branching priority
Partition | Variable partition
VBasis | Basis status
PStart | Simplex start vector
IISLB | Indicates whether the lower bound participates in the IIS
IISUB | Indicates whether the upper bound participates in the IIS
IISLBForce | Forces variable lower bound into (1) or out of (0) the computed IIS
IISUBForce | Forces variable upper bound into (1) or out of (0) the computed IIS
PoolIgnore | Flag variables to ignore when checking whether two solutions are identical
PWLObjCvx | Indicates whether the variable has a convex piecewise-linear objective
SAObjLow | Objective coefficient sensitivity information
SAObjUp | Objective coefficient sensitivity information
SALBLow | Lower bound sensitivity information
SALBUp | Lower bound sensitivity information
SAUBLow | Upper bound sensitivity information
SAUBUp | Upper bound sensitivity information
UnbdRay | Unbounded ray

Linear constraint attributes:

These attributes provide information that is associated with specific linear constraints.

Attribute name | Description
--- | ---
Sense | Constraint sense (`'<'`, `'>'`, or `'='`)
RHS | Right-hand side value
ConstrName | Constraint name
CTag | Constraint tag
Pi | Dual value (also known as the shadow price)
Slack | Slack in the current solution
CBasis | Basis status
BarPi | Dual value in the best barrier iterate (before crossover)
DStart | Simplex start vector
Lazy | Determines whether a constraint is treated as a lazy constraint
IISConstr | Indicates whether the constraint participates in the IIS
IISConstrForce | Forces constraint into (1) or out of (0) the computed IIS
SARHSLow | Right-hand side sensitivity information
SARHSUp | Right-hand side sensitivity information
FarkasDual | Farkas infeasibility proof

SOS attributes:

These attributes provide information that is associated with specific Special-Ordered Set (SOS) constraints.

Attribute name | Description
--- | ---
IISSOS | Indicates whether the SOS constraint participates in the IIS
IISSOSForce | Forces the SOS constraint into (1) or out of (0) the computed IIS

Quadratic constraint attributes:

These attributes provide information that is associated with specific quadratic constraints.

Attribute name | Description
--- | ---
QCSense | Constraint sense (`'<'`, `'>'`, or `'='`)
QCRHS | Right-hand side
QCName | Quadratic constraint name
QCPi | Dual value
QCSlack | Slack in the current solution
QCTag | Quadratic constraint tag
IISQConstr | Indicates whether the quadratic constraint participates in the IIS
IISQConstrForce | Forces the quadratic constraint into (1) or out of (0) the computed IIS

General constraint attributes:

These attributes provide information that is associated with specific general constraints. Those starting with “Func” are only for function constraints.

Attribute name | Description
--- | ---
FuncPieceError | Error allowed for PWL translation
FuncPieceLength | Piece length for PWL translation
FuncPieceRatio | Controls whether to under- or over-estimate function values in PWL approximation
FuncPieces | Sets strategy for PWL function approximation
FuncNonlinear | Chooses the approximation approach used to handle a function constraint
GenConstrType | Type of general constraint
GenConstrName | General constraint name
IISGenConstr | Indicates whether the general constraint participates in the IIS
IISGenConstrForce | Forces the general constraint into (1) or out of (0) the computed IIS

Solution quality attributes:

Attribute name | Description
--- | ---
MaxVio | Maximum (unscaled) violation
BoundVio | Maximum (unscaled) bound violation
BoundSVio | Maximum (scaled) bound violation
BoundVioIndex | Index of variable with the largest (unscaled) bound violation
BoundSVioIndex | Index of variable with the largest (scaled) bound violation
BoundVioSum | Sum of (unscaled) bound violations
BoundSVioSum | Sum of (scaled) bound violations
ConstrVio | Maximum (unscaled) constraint violation
ConstrSVio | Maximum (scaled) constraint violation
ConstrVioIndex | Index of constraint with the largest (unscaled) violation
ConstrSVioIndex | Index of constraint with the largest (scaled) violation
ConstrVioSum | Sum of (unscaled) constraint violations
ConstrSVioSum | Sum of (scaled) constraint violations
ConstrResidual | Maximum (unscaled) primal constraint error
ConstrSResidual | Maximum (scaled) primal constraint error
ConstrResidualIndex | Index of constraint with the largest (unscaled) primal constraint error
ConstrSResidualIndex | Index of constraint with the largest (scaled) primal constraint error
ConstrResidualSum | Sum of (unscaled) primal constraint errors
ConstrSResidualSum | Sum of (scaled) primal constraint errors
DualVio | Maximum (unscaled) reduced cost violation
DualSVio | Maximum (scaled) reduced cost violation
DualVioIndex | Index of variable with the largest (unscaled) reduced cost violation
DualSVioIndex | Index of variable with the largest (scaled) reduced cost violation
DualVioSum | Sum of (unscaled) reduced cost violations
DualSVioSum | Sum of (scaled) reduced cost violations
DualResidual | Maximum (unscaled) dual constraint error
DualSResidual | Maximum (scaled) dual constraint error
DualResidualIndex | Index of variable with the largest (unscaled) dual constraint error
DualSResidualIndex | Index of variable with the largest (scaled) dual constraint error
DualResidualSum | Sum of (unscaled) dual constraint errors
DualSResidualSum | Sum of (scaled) dual constraint errors
ComplVio | Maximum complementarity violation
ComplVioIndex | Index of variable with the largest complementarity violation
ComplVioSum | Sum of complementarity violations
IntVio | Maximum integrality violation
IntVioIndex | Index of variable with the largest integrality violation
IntVioSum | Sum of integrality violations

Multi-objective attributes:

Attribute name | Description
--- | ---
NumObj | Number of objective functions in a multi-objective model
NumObjPasses | Number of optimization passes in a multi-objective solve
ObjN | Objective value of selected objective function in a multi-objective model
ObjNAbsTol | Absolute tolerance for selected objective function in a multi-objective model
ObjNCon | Constant term of selected objective function in a multi-objective model
ObjNName | Name of selected objective function in a multi-objective model
ObjNPriority | Priority of selected objective function in a multi-objective model
ObjNRelTol | Relative tolerance of selected objective function in a multi-objective model
ObjNVal | Value of selected objective function in a multi-objective model
ObjNWeight | Weight of selected objective function in a multi-objective model
ObjNPass | Index of the optimization pass that the selected objective function in a multi-objective solve participated in
ObjPassNIterCount | Number of simplex interations for the selected optimization pass in a multi-objective solve
ObjPassNMipGap | MIP gap for the selected optimization pass in a multi-objective solve
ObjPassNNodeCount | Number of explored nodes for the selected optimization pass in a multi-objective solve
ObjPassNObjBound | Objective bound for the selected optimization pass in a multi-objective solve
ObjPassNObjVal | Objective value for the selected optimization pass in a multi-objective solve
ObjPassNOpenNodeCount | Number unexplored nodes for the selected optimization pass in a multi-objective solve
ObjPassNRuntime | Runtime for the selected optimization pass in a multi-objective solve
ObjPassNStatus | Solve status for the selected optimization pass in a multi-objective solve
ObjPassNWork | Deterministic work units for the selected optimization pass in a multi-objective solve

Multi-scenario attributes:

Attribute name | Description
--- | ---
ScenNLB | Lower bound changes of current scenario in multi-scenario model
ScenNUB | Upper bound changes of current scenario in multi-scenario model
ScenNObj | Objective coefficient changes of current scenario in multi-scenario model
ScenNRHS | Right-hand side changes of current scenario in multi-scenario model
ScenNName | Name of current scenario in multi-scenario model
ScenNObjBound | Objective bound of current scenario in multi-scenario model
ScenNObjVal | Objective value for current solution of current scenario in multi-scenario model
ScenNX | Value in the current solution of current scenario in multi-scenario model
NumScenarios | Number of scenarios

Batch attributes:

Attribute name | Description
--- | ---
BatchErrorCode | Last error code received from the Cluster Manager
BatchErrorMessage | Last error message received from the Cluster Manager
BatchID | ID of the remote batch
BatchStatus | Status of the batch

Help and Feedback

Press `/` or click to search this documentation | Gurobi website | Gurobi community forum
Go to other Gurobi documentation | Gurobi download | Contact support