Gurobi can compute an Irreducible Inconsistent Subset (IIS) of an infeasible model. This can be used to identify which constraints render the model infeasible and need to be relaxed to find a feasible solution.
The approach is based on this paper:
We can show that the dual Farkas proof generates an IIS. We add the variable bounds as constraints and consider the linear system
A x <= b
The paper shows that the support (indices corresponding to the nonzero values) of any vertex (or basis) of
A'y = 0
b'y <= -1
y >= 0
gives an IIS. Note that there are different approaches to compute an IIS, and, since Gurobi does not compute the IIS with minimal cardinality, there may exist an irreducible infeasible system smaller than what Gurobi reports.