You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
It seems that MPB statuses needs to be reworked. See e.g.:
stat !=: Optimalnlp problems jump-dev/JuMP.jl#938Following @erling-d-andersen's comment, it would help to separate the statuses in
getsolutiongetdualI 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!,statuswould return:Questions:
abstract AbstractOptimizerStatus? If it is a subtype thenUserLimitcould contain a string message giving more precision that would be printed if we callshowon it orUserLimitcould 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:
In view of this, we could define:
isprimalfeasible(m):trueif it is sure that the primal is feasible,falseif it is sure it is infeasible,knowsprimalfeasibility(m):true:isprimalfeasiblewould returnfalse:isprimalfeasiblewould throw an errorand likewise
isprimalbounded,knowsprimalboundedness,isdualfeasible;knowsdualfeasible,isdualbounded,knowsdualboundedness.These functions would only reflect the knowledge acquired by the last
optimize!called !Questions:
problemstatuswhich would return a object of typeProblemStatuswhich can answer to the same 8 functionis.../knows....Solution Status
primalsolutionavailable(m)the solver allows to retrieve values for primal variables, i.e.getsolutionwould not throw an error.dualsolutionavailablethe solver allows to retrieve values for variable and constraint dual variables, i.e.getdual, ... would not throw an error.issolutionfeasible(m)(resp.issolutionoptimal(m)) wouldtrueif we are sure that the solution that would be returned bygetsolution(m)is feasible (resp. optimal), otherwise, it returnsfalse.falsewould 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:
solutionstatus(m)that would returnSolutionStatuswhich could reply toissolutionfeasibleandissolutionoptimal.