Skip to content

[RFC] New Status Mechanism #156

@blegat

Description

@blegat

It seems that MPB statuses needs to be reworked. See e.g.:

Following @erling-d-andersen's comment, it would help to separate the statuses in

  • Feasibility/Optimality of getsolution
  • Feasibility/Optimality of getdual
  • Feasibility/Boundedness of the primal
  • Feasibility/Boundedness of the dual
  • Optimizer status : why he has stopped

I do not claim to have a perfect solution for a new status mechanism, I am just hoping to open the discussion with a reasonable start.

Optimizer status

Afther calling optimize!, status would return:

Name Reason of stopping
Success Found something to share (e.g. infeasibility ray)
NumericalError Encountered numerical difficulties
Stall Stopped because no more progress could be made but the time limit/iteration limit was not reached
UserLimit Stopped because of time limit/iteration limit was reached
Out Of Memory More space needs to be allocated than what is available
Error Other reason than listed above

Questions:

  • Should the status be a symbol of a subtype of abstract AbstractOptimizerStatus ? If it is a subtype then UserLimit could contain a string message giving more precision that would be printed if we call show on it or UserLimit could be an abstract type that is subtyped by each solver. What would you prefer ?

Problem Status

We could split the primal (resp. dual) status in 2:

Yes No Unknown
Feasible
Bounded

In view of this, we could define:

  • isprimalfeasible(m):
    • true if it is sure that the primal is feasible,
    • false if it is sure it is infeasible,
    • throws an error otherwise,
  • knowsprimalfeasibility(m):
    • true: isprimalfeasible would return
    • false: isprimalfeasible would throw an error

and likewise isprimalbounded, knowsprimalboundedness, isdualfeasible; knowsdualfeasible, isdualbounded, knowsdualboundedness.
These functions would only reflect the knowledge acquired by the last optimize! called !

Questions:

  • What if someone wants to save the problem status to be used later ? We could add a function problemstatus which would return a object of type ProblemStatus which can answer to the same 8 function is.../knows....
  • Does Unbounded also means Feasible or simply that an unbounded ray has been found (See Test that getsolution is feasible when problem is Unbounded #144 ) ?
  • Does Bounded also means Feasible ? I would say no to that. Typically it means that the dual is feasible. By the way the boundedness of the primal might seem redundant with the feasibility of the dual. However, it might happen that the primal is bounded and the dual is infeasible in case of (infinite) strong duality failure (I do not have any example to give but I don't see what prevents it to happen).

Solution Status

  • primalsolutionavailable(m) the solver allows to retrieve values for primal variables, i.e. getsolution would not throw an error.
  • dualsolutionavailable the solver allows to retrieve values for variable and constraint dual variables, i.e. getdual, ... would not throw an error.

issolutionfeasible(m) (resp. issolutionoptimal(m)) would true if we are sure that the solution that would be returned by getsolution(m) is feasible (resp. optimal), otherwise, it returns false.
false would not mean that we are sure that it is not feasible (resp. not optimal), it would just mean that we do not know whether it is optimal/feasible.

Questions:

  • What if we want to store the solution status to query it later ? We could define solutionstatus(m) that would return SolutionStatus which could reply to issolutionfeasible and issolutionoptimal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions