# Debugging cplex model

I implemented a cplex model and I am convinced that the model should allow a better solution on a specific instance. However, when I impose the variable values of the solution onto the model, it returns no solution.

Is there a simple way to find "the inequality that makes the solution infeasible"? I think, I once had cplex give me a violated inequality?

CPLEX has a conflict refiner. The instructions for invoking it are at How to invoke the conflict refiner.

With CPLEX_CMD : execute the following commands

read(your_problem.lp)

optimize

tools

conflict

display

conflict

all


This will give you the smallest set of equations that make the problem infeasible.

• May the downvoter explain the downvote ? The set of command lines provides exactly what OP is asking if I am not crazy. I use this all the time. – Kuifje Nov 14 '19 at 17:52
• I didn't down-vote, but the question is how to find out why a particular hypothetical solution is infeasible, not why the model is infeasible. (The model in fact seems to be feasible, put possibly missing an optimal solution.) – prubin Nov 14 '19 at 22:19
• @prubin thank you for your feedback you are right. In this case I would add the variable values (or a subset of them) as constraints of the program and follow the same procedure. – Kuifje Nov 15 '19 at 9:00