[Clp] Second solve with Clp
John J Forrest
jjforre at us.ibm.com
Sun Apr 19 18:13:54 EDT 2009
Stupid mistake in primal (was okay in dual). Surprising not found before.
Fixed in 1.10
From: Balazs Dezso <deba.mf at gmail.com>
To: clp at list.coin-or.org
Date: 04/19/2009 08:14 AM
Subject: [Clp] Second solve with Clp
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
_______________________________________________
Clp mailing list
Clp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/clp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090419/ce9e4eb4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090419/ce9e4eb4/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20090419/ce9e4eb4/attachment-0001.gif>
More information about the Clp
mailing list