Concepts
Features
Reference
Gurobi column object. A column consists of a list of coefficient,constraint pairs. Columns are used to represent the set of constraintsin which a variable participates, and the associated coefficients. Theyare temporary objects that typically have short lifespans.
You generally build columns by starting with an empty column (using theGRBColumn constructor), and then adding terms. Terms can beadded individually, usingaddTerm, or in groups, usingaddTerms. Terms can also be removed from a column, usingremove.
Individual terms in a column can be queried using thegetConstr, andgetCoeff methods. You can querythe number of terms in the column using thesize method.
Add a single term into a column.
coeff – Coefficient for new term.
constr – Constraint for new term.
Add a list of terms into a column.
coeffs – Coefficients for new terms.
constrs – Constraints for new terms.
count – Number of terms to add to the column.
Remove all terms from a column.
Retrieve the coefficient from a single term in the column.
Coefficient for the term at indexi in the column.
Retrieve the constraint object from a single term in the column.
Constraint for the term at indexi in the column.
Remove the term stored at indexi of the column.
i – The index of the term to be removed.
Remove the term associated with constraintconstr from the column.
constr – The constraint whose term should be removed.
Returnstrue if the constraint appeared in the column (andwas removed).
Retrieve the number of terms in the column.
Number of terms in the column.
Help and Feedback