coin-or / Clp

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

Clp fails to solve linear program #235

Open mengtsinghua opened 2 years ago

mengtsinghua commented 2 years ago

Expected solution is min(z): Optimal objective 3.236842105e+00 COL01 2.5 COL02 1.05 COL03 0.0 COL04 0.6428571428571429 COL05 0.5 COL06 4.0 COL07 0.0 COL08 0.2631578947368421

But the actual solution is below Optimal objective 1.24494311 - 0 iterations time 0.002, Presolve 0.00 optimal Row 0, primal 2.5, dual 0.663717 Row 1, primal 2.1, dual -0.331858 Row 2, primal 4, dual 0 Row 3, primal 1.8, dual 0.474083 Row 4, primal 15, dual -0.176991 Row 5, primal -2.22045e-16, dual -0.474083 Row 6, primal 15, dual 0 COL01, primal 1.99539, dual 0 COL02, primal 1.05, dual -1.11022e-16 COL03, primal 0, dual 0.365044 COL04, primal 1.14286, dual 0 COL05, primal 0.5, dual 4.16814 COL06, primal 4, dual 0 COL07, primal 1.16667, dual -1.11022e-16 COL08, primal 1.75044, dual 5.55112e-17 optimal Row 0, primal 2.5, dual 0.663717 Row 1, primal 2.1, dual -0.331858 Row 2, primal 4, dual 0 Row 3, primal 1.8, dual 0.474083 Row 4, primal 15, dual -0.176991 Row 5, primal -2.22045e-16, dual -0.474083 Row 6, primal 15, dual 0 COL01, primal 1.99539, dual 0 COL02, primal 1.05, dual -1.11022e-16 COL03, primal 0, dual 0.365044 COL04, primal 1.14286, dual 0 COL05, primal 0.5, dual 4.16814 COL06, primal 4, dual 0 COL07, primal 1.16667, dual -1.11022e-16 COL08, primal 1.75044, dual 5.55112e-17

mengtsinghua commented 2 years ago

The above LP problem can be successfully solved by Soplex and Gurobi, but fails to be solved by Clp.

jjhforrest commented 2 years ago

Seems to be an error in reading mps files with more than one rhs.  If the two lines RNG1 are commented out the correct solution is found.  Somehow the lower bound on COL01 is being skipped.

Should be able to fix today.

On 26/05/2022 10:21, mengtsinghua wrote:

The above LP problem can be successfully solved by Soplex and Gurobi, but failed to be solved by Clp.

— Reply to this email directly, view it on GitHub https://github.com/coin-or/Clp/issues/235#issuecomment-1138336218, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWJYHF2JDCTE4C5D33YVVTVL47BTANCNFSM5WMCI47A. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jjhforrest commented 2 years ago

Should be fixed in stable, but simpler to avoid having multiple rhs, rnges or bounds in mps file.

On 26/05/2022 10:21, mengtsinghua wrote:

The above LP problem can be successfully solved by Soplex and Gurobi, but failed to be solved by Clp.

— Reply to this email directly, view it on GitHub https://github.com/coin-or/Clp/issues/235#issuecomment-1138336218, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWJYHF2JDCTE4C5D33YVVTVL47BTANCNFSM5WMCI47A. You are receiving this because you are subscribed to this thread.Message ID: @.***>