coin-or / Clp

COIN-OR Linear Programming Solver
Other
396 stars 82 forks source link

Solution is claimed optimal but violates variable bound by 0.000914959 #203

Closed tosttost closed 3 years ago

tosttost commented 3 years ago

I assume that 0.000914959 is larger than the tolerances of Clp. This only happens with current master (build with --no-third-party), Clp 1.17.6 works fine. So do SCIP/Soplex and Gurobi.

The faulty variable is C0001283 with lower bound 0 and value -0.00091495942.

Problem ClpDefau has 9631 rows, 19265 columns and 48146 elements
Model was imported from /tmp/l1.mps.gz in 0.02905 seconds
Presolve 9631 (0) rows, 19265 (0) columns and 48146 (0) elements
7183  Obj 11122011 Primal inf 32168.399 (3315) Dual inf 8.5341177e+10 (3318)
10848  Obj 24486445 Dual inf 2062793.5 (3)
Optimal - objective value 24301532
Optimal objective 24301532.35 - 11678 iterations time 2.062

Optimal - objective value        24301532
[...]
**    1283 C0001283  -0.00091495942                       2

so if you use command line Clp and -solu you get some warning by the '**' prefix. Of course that is not the case if Clp is used as a library.

l1.mps.gz

jjhforrest commented 3 years ago

I am not able to reproduce the problem. It looks as if the scaled problem is feasible, while unscaled is not.

In master (some time ago) the default primal tolerance was changed from 1.0e-7 to 1.0e-6. Try setting it back to 1.0e-7.

Clp should have returned a secondary status indicating that scaled problem is infeasible. I have written code to put out a message if this happens - now I am trying to find a problem which triggers that. When I do and can check change, I will put it into master.

John Forrest

On 02/09/2021 08:42, tosttost wrote:

I assume that 0.000914959 is larger than the tolerances of Clp. This only happens with current master (build with --no-third-party), Clp 1.17.6 works fine. So do SCIP/Soplex and Gurobi.

The faulty variable is C0001283 with lower bound 0 and value -0.00091495942.

|Problem ClpDefau has 9631 rows, 19265 columns and 48146 elements Model was imported from /tmp/l1.mps.gz in 0.02905 seconds Presolve 9631 (0) rows, 19265 (0) columns and 48146 (0) elements 7183 Obj 11122011 Primal inf 32168.399 (3315) Dual inf 8.5341177e+10 (3318) 10848 Obj 24486445 Dual inf 2062793.5 (3) Optimal - objective value 24301532 Optimal objective 24301532.35 - 11678 iterations time 2.062 Optimal - objective value 24301532 [...] ** 1283 C0001283 -0.00091495942 2 |

so if you use command line Clp and -solu you get some warning by the '**' prefix. Of course that is not the case if Clp is used as a library.

l1.mps.gz https://github.com/coin-or/Clp/files/7096945/l1.mps.gz

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coin-or/Clp/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWJYHH5GUXYRC5PEWVPA7DT74TFXANCNFSM5DINUM7A. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tosttost commented 3 years ago

Thanks, I can simply check the secondary status and react accordingly - I didn't know that there is a secondary status... I have solved many problems using cbc/clp and this is the first time the unscaled model was infeasible so it seems to be a rather pathological case. I can still reproduce this problem including the new message. From my side the problem is solved, numerical issues happen with all solvers that use floating point math.

Inside an empty directory (apart from coinbrew) I run

./coinbrew fetch Clp@master
./coinbrew build Clp@master
dist/bin/Clp l1.mps.gz -solve

platform is linux-gnu-x86_64, the compiler is gcc 11.1 and configure picks up several system-installed libraries (openblas, lapack, linear solver related stuff: metis, suitesparse, cholmod, ...) but afaik those affect mainly the barrier code.