David Doria David Doria - 6 months ago 65
Python Question

What does PuLP LpStatus=Undefined actually mean?

When I add a particular constraint to my problem, the LpStatus of the problem after solving changes to "Undefined" (without this constraint, it was "Optimal"). At the top of this page, the possibilities of the return status are shown, but it doesn't seem to explain what they mean. Can anyone explain what an "undefined" status means? It it something like a syntax error in specifying the constraint?


There are five status codes that can be returned from a solver in PuLP:

  1. Optimal
  2. Not Solved
  3. Infeasible
  4. Unbounded
  5. Undefined


Optimal solution exists and is found.

Not Solved

Is the default setting before a problem has been solved.


The problem has no feasible solution.


The cost function is unbounded.


Feasible solution hasn't been found (but may exist).

They seem to be a mapping of the status codes from GPLK.

Most of the information comes from reading the source and this resource