Skip to content
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

Clp fails to solve linear program #235

Open
mengtsinghua opened this issue May 19, 2022 · 3 comments
Open

Clp fails to solve linear program #235

mengtsinghua opened this issue May 19, 2022 · 3 comments

Comments

@mengtsinghua
Copy link

mengtsinghua commented May 19, 2022

  • Minimize Z = x1 + 2x5 - x8
  • Subject to:
  • 2.5 <= 3x1 + x2 - 2x4 - x5 - x8
  •             2x2 + 1.1x3                                   <=  2.1
    
  •                      x3              + x6                  =  4.0
    
  • 1.8 <= 2.8x4 -1.2x7
  •     5.6x1                       + x5              + 1.9x8 <= 15.0
    
  •                          2.8x4             -1.2x7         <=  5.0
    
  • 3.0 <= 5.6x1 + x5 + 1.9x8
  • where:
  • 2.5 <= x1
  • 0 <= x2 <= 4.1
  • 0 <= x3
  • 0 <= x4
  • 0.5 <= x5 <= 4.0
  • 0 <= x6
  • 0 <= x7
  • 0 <= x8 <= 4.3

NAME EXAMPLE
ROWS
N OBJ
G ROW01
L ROW02
E ROW03
G ROW04
L ROW05
L ROW06
G ROW07
COLUMNS
COL01 OBJ 1.0 ROW05 5.6
COL01 ROW01 3.0 ROW07 5.6
COL02 ROW01 1.0 ROW02 2.0
COL03 ROW02 1.1 ROW03 1.0
COL04 ROW01 -2.0 ROW04 2.8
COL05 ROW06 2.8
COL05 OBJ 2.0 ROW07 1.0
COL05 ROW01 -1.0 ROW05 1.0
COL06 ROW03 1.0
COL07 ROW04 -1.2 ROW06 -1.2
COL08 OBJ -1.0 ROW07 1.9
COL08 ROW01 -1.0 ROW05 1.9
RHS
RHS1 ROW01 2.5
RHS1 ROW02 2.1
RHS1 ROW03 4.0
RHS1 ROW04 1.8
RHS1 ROW05 15.0
RNG1 ROW06 5.0
RNG1 ROW07 3.0
BOUNDS
LO BND1 COL01 2.5
UP BND1 COL02 4.1
LO BND1 COL05 0.5
UP BND1 COL05 4.0
UP BND1 COL08 4.3
ENDATA

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
Copy link
Author

mengtsinghua commented May 26, 2022

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

@mengtsinghua mengtsinghua changed the title Clp failed to solve linear program Clp fails to solve linear program May 26, 2022
@jjhforrest
Copy link
Contributor

jjhforrest commented May 26, 2022 via email

@jjhforrest
Copy link
Contributor

jjhforrest commented May 26, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants