In CPLEX, how to find a variable in the model is in the basis or not?

369 views Asked by At

I am looking for a simple way to obtain the list of base variables a LP problem with CPLEX, or a way to indicate a variable is in basis or not?

Actually, I am working on a column generation algorithm. After solving the Restricted Master Problem, the new column becomes 0. How can check the new variable is 0 but in basis, i.e., degeneracy, or it is not in basis and there is an error in my implementation?

1

There are 1 answers

0
Alex Fleischer On

you could use getBasisStatuses in C++

This method puts the basis status of each variable in var into the corresponding element of the array cstat, and it puts the status of each row in con (an array of ranges or constraints)into the corresponding element of the array rstat.Arrays rstat and cstat are resizedaccordingly.