[Clp] Second solve with Clp
Balazs Dezso
deba.mf at gmail.com
Sun Apr 19 05:25:44 EDT 2009
Hi
I written an infeasible problem in Clp, and I solved it with primal simplex
twice. The first solving was really infeasible, but the second reported optimal
solution.
The code:
#include <coin/ClpSimplex.hpp>
const int rn = 2;
const int cn = 1;
double rub[rn] = { COIN_DBL_MAX, -2 };
double rlb[rn] = { -1, -COIN_DBL_MAX };
int ind[rn] = { 0, 1};
double coeff[rn] = { 1, 1 };
int main() {
ClpSimplex prob;
prob.addColumn(rn, ind, coeff, -COIN_DBL_MAX, COIN_DBL_MAX, 1);
prob.addRows(rn, rlb, rub, 0, 0, 0);
prob.primal();
prob.primal();
return 0;
}
The problem is just:
-1 <= x1
x1 <= -2
min x1
The log message is
Clp0006I 0 Obj 0 Primal inf 2 (1) Dual inf 1e+08 (1) w.o. free dual inf (0)
Clp0006I 1 Obj -2 Primal inf 1 (1)
Clp0001I Primal infeasible - objective value -2
Clp0000I Optimal - objective value -2
Is it a bug in Clp or I have missed something(maybe parameters for primal() or
some cleaning codes between two iterations)?
I tested 1.10 and 1.9 stable branch heads. The issue is important for right
handling of Clp solver in LEMON LP/MIP solver interface (newly joined COIN-OR
project).
Best, Balazs
More information about the Clp
mailing list