GRBgetBasisHead

int GRBgetBasisHead ( GRBmodel *model,
    int *bhead )

Returns the indices of the variables that make up the current basis matrix.

Return value:

A non-zero return value indicates that a problem occurred while extracting the basis. Refer to the Error Code table for a list of possible return values. Details on the error can be obtained by calling GRBgeterrormsg.

Arguments:

model: The model. Note that the model must have a current optimal basis, as computed by GRBoptimize.

bhead: The constraint matrix columns that make up the current basis. The result contains one entry per constraint in <span>$</span>A<span>$</span>. If bhead[i]=j, then column i in the basis matrix <span>$</span>B<span>$</span> is column j from the constraint matrix <span>$</span>A<span>$</span>. Note that the basis may contain slack or artificial variables. If bhead[i] is greater than or equal to cols (the number of columns in <span>$</span>A<span>$</span>), then the corresponding basis column is the artificial or slack variable from row bhead[i]-cols.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search