What does PuLP LpStatus = Undefined mean?

When I add a specific restriction to my problem, LpStatus problems after resolving the changes to "Undefined" (without this restriction, it was "Optimal"). The return status options are shown at the top of this page, but this does not seem to explain what they mean. Can someone explain what the status is "Undefined"? Is this a bit of a syntax error when specifying a constraint?

+7
python pulp
source share
2 answers

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

  • Optimal
  • Is not allowed
  • unacceptable
  • Unlimited
  • Undefined

OPTIMAL

The optimal solution exists and is found.

Is not allowed

The default value before the problem has been resolved.

unacceptable

The problem does not have an acceptable solution.

not limited

The cost function is not limited.

Undefined

A possible solution was not found (but may exist).

They seem to display status codes from the GPLK .

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

+8
source share

"Undefined" means that PuLP does not know how to interpret the output of the solver, but it seems to happen when some mixed integer programs are invalid.

Whether you get "Undefined" or "unfeasible" depends on which solver uses PuLP, for example. CBC, GLPK, COIN, etc. These solvers have a “press” step, and then a decision step; if it is found impossible to detect in a pretext, it will return “Undefined”, if it detects at the solution stage, it will return “Inevitable”.

I used only CBC and GLPK solvers, and I only saw this problem with a CBC solver. This thread indicates that a bug in the GLPK resolver was fixed in GLPK version 4.53.

Here's some more technical info on where "Undefined" comes from:

My hypothesis is that the status of "Undefined" means that the CBC ends in some strange way, leaving PuLP an intermediate solution for the relaxation subtask. (Because 'Undefined' is the default status when the readsol_MPS PuLP method cannot find any of the other PuLP statuses in the CBC solution file. I found this in solver.py PuLP.)

And here is the source for the press problem.

This can happen when inadmissibility is detected by the mip preprocessor (and not the mip solver), which does not mistakenly change the mip status of the solution, so it remains undefined.

0
source share

All Articles