# Getting all active constraints of an LP from Cplex

I was wondering if it is possible to get the active constraints of a linear program from the Python API of Cplex? Or do I have to go through the constraints one by one and check if they bind with equality for the current solution?

• Thanks! I managed to find the method cplex.solution.basis.get_basis(). Should I use cplex.solution.basis.get_basis()[1], and those that are 1 correspond to active constraints? Jun 24 at 14:44