New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HiGHS returns wrong solution? #1259
Comments
Perhaps interestingly, lowering
But SCIP does report OP's result for both bounds, so something is amiss:
|
I, too, reduced There's clearly a bug in the MIP solver, as HiGHS gets 241.252481008, even when --presolve=off |
I have debugged the issue. The value of C19_F163_I79 is returned as 9.99e-07 from the analytic center computation, which is the upper bound (1.00E-6); therefore, it is fixed to that value while it should have been 0. It is possible to check this claim by fixing the variable in the MPS file. The problem occurs in the post-process (https://github.com/ERGO-Code/HiGHS/blob/master/src/lp_data/HighsSolution.cpp#L623). In the analytic center computation, the column's value is 4.02e-07, and the value of the dual is -9.19e-07. Then, the below conditions are met:
(dual_feasibility_tolerance = 9.99e-08 and dual_infeasibility = 9.19e-07 since it is abs(dual)) and the variable is fixed at 9.99e-07. I have experimented with changing the optimality_tol_ of the IPM from 1e-08 to 1e-10. The iteration count of the IPM increased from 14 to 17, and the new column value became 4.24e-07 while the dual is -1.18e-10. Since the dual_infeasibility is now less than the tolerance, the problem is solved correctly. There are different ways of tackling the issue (decreasing the optimality_tol_, or scaling the problem since the residual can at most be 9.99e-07 for this variable). I can experiment with different options and report the results. Based on your suggestions, I would like to open a PR to solve this. Thanks, Edit: Scaling the residual might be an easier option. I have played around with something like this, and it solved the problem:
(There is already a control that checks upper > lower before). This looks safe, but I didn't check the performance implications. |
Thanks, but this won't work when (for example) one of I'll have a look, but changes at this level of the HiGHS solvers have to be made with extreme care |
I proposed it mainly as a starting point, but it works with infinity since we have If there is anything I can help with the tests, I would like to help. I can try out different options based on discussions with you. I want to propose using HiGHS as an open-source solver for my company; therefore, I would like to help out with the bugs. Thanks |
I have another example where the difference is even bigger. Even with presolve off and a relative mip tolerance of 1e-8, HiGHS reports 241.5540085 as optimal value while other solvers like scip and Gurobi report 241.43565000 |
Yes, it's the same issue. The proposed fix solves this problem too. |
This reverts commit 8094b42.
issue-1259.mps.txt returns a wrong solution with HiGHS:
So it says that the optimal solution is 241.252481008
However when I solve this with other solvers (Lindo, scip, lpsolve) they all report a cheaper solution:
Lindo: 241.234839463
scip: 241.234839463423
lpsolve: 241.23483946
Regards,
Peter
The text was updated successfully, but these errors were encountered: