Clp is unable to solve one very simple Linear Program problem
mengtsinghua opened this issue · 0 comments
- min(z) = -3x1 - x2
-
s.t. 2x1 + x2 <= 3
-
3x1 + x2 <= 12
-
x1 + x2 >= 5
-
x1 is free
-
x2 <= 18
**
NAME BOUNDEDVAR5
ROWS
N COST
L ROW1
L ROW2
G ROW3
COLUMNS
X1 COST -3 ROW1 2
X1 ROW2 3 ROW3 1
X2 COST -1 ROW1 1
X2 ROW2 1 ROW3 1
RHS
RHS1 ROW1 3 ROW2 12
RHS1 ROW3 5
BOUNDS
FR BND1 X1 0
MI BND1 X2 0
UP BND1 X2 18
ENDATA
The expected objective value from Gurobi is -1 below.
One of infinite optimal solutions from standard Simplex is below.
Y1: 0
Y2: 2
Y3: 11
Y4: 0
Y5: 0
Y6: 11
min(z):-1
X1=-2
X2=7
But the actual solution of Clp is different as follow.
Optimal - objective value 0.5
After Postsolve, objective 0.5, infeasibilities - dual 0 (0), primal 0 (0)
Optimal objective 0.5 - 0 iterations time 0.002, Presolve 0.00
optimal
Row 0, primal 4, dual -1.5
Row 1, primal 1, dual 0
Row 2, primal 9, dual 0.5
X1, primal 0, dual 4.5
X2, primal 2.5, dual 0
X3, primal 1.5, dual -1.66533e-16
optimal
Row 0, primal 4, dual -1.5
Row 1, primal 1, dual 0
Row 2, primal 9, dual 0.5
X1, primal 0, dual 4.5
X2, primal 2.5, dual 0
X3, primal 1.5, dual -1.66533e-16