HiGHS icon indicating copy to clipboard operation
HiGHS copied to clipboard

Clarify meaning of `kHighsStatusWarning` in `Highs_run`

Open amigalemming opened this issue 1 year ago • 5 comments

I am uncertain how to cope with kHighsStatusWarning of Highs_run. It seems to be returned in cases where the optimization result is unreliable. But what is the difference to kHighsStatusError? Is there a function to get more information about the meaning of the warning? I'd like to see a clarification in highs_c_api.h or in the documentation.

amigalemming avatar Jan 07 '24 11:01 amigalemming

This warning flag indicates that something unusual has happened, but that the problem has been solved OK.

I'll add a comment to this effect in the documentation.

jajhall avatar Jan 07 '24 11:01 jajhall

In #1561 I get kHighsStatusWarning but the result deviates considerably from the result that finished with kHighsStatusOk, thus I guess, it is wrong.

amigalemming avatar Jan 07 '24 11:01 amigalemming

OK I'll get to the bottom of this when I investigate #1561

jajhall avatar Jan 07 '24 12:01 jajhall

Having looked at your example from #1561, to be more precise Highs_run(highs) returning kHighsStatusWarning indicates that something unusual has happened, but that the problem may have been solved OK. To determine this, the user should look at the model status and number of primal and dual infeasibilities.

jajhall avatar Jan 07 '24 15:01 jajhall

Beyond looking for logging lines with the prefix "Warning", here is no current way for users to identify retrospectively the reason for the kHighsStatusWarning return. The same is true for kHighsStatusError. The difference between the two is that when Highs_run(highs) returns kHighsStatusError, it is known that the solve has failed

jajhall avatar Jan 07 '24 15:01 jajhall