David Doria David Doria - 1 month ago 12
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?

Answer

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

Optimal solution exists and is found.

Not Solved

Is the default setting before a problem has been solved.

INFEASIBLE

The problem has no feasible solution.

UNBOUNDED

The cost function is unbounded.

UNDEFINED

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

Comments