0

I am using pulp to solve a lineal problem in python, I have thousands of constraints, so I can not check each constraints, and my result with some constraints is "Infeasible".

Each restriction has an associated name, how can I know which constraint is not feasible? (In order to fix up the input data or the constraint)

I found this information but the solution code does not work:

How to make solverstudio (pulp and cbc) report out conflict constraints in case of infeasble?

I am using python 3.6 64 bits.

  • Welcome to Stack Overflow, @F. Riquelme. Please let us know how the solution code does not work form you and what you have already tried. – Degan Jul 05 '17 at 00:04
  • I try this: for c in lp.constraints.itervalues(): if not c.valid(0): print c.name, c.value(), tomorrow i will add more details. – F. Riquelme Jul 05 '17 at 00:55
  • I prefer using slack variables. https://stackoverflow.com/questions/62754051/pulp-constraints-when-probelm-is-infeasible/62771338#62771338 – Jesse Dec 10 '21 at 06:29

0 Answers0