[Coin-lpsolver] Precision for Clp solution
John J Forrest
jjforre at us.ibm.com
Thu Apr 13 12:08:13 EDT 2006
Francois,
I will look at it next week - maybe just a tolerance issue.
John Forrest
Francois Margot <fmargot at andrew.cmu.edu>
Sent by: coin-lpsolver-bounces at list.coin-or.org
04/10/2006 10:19 AM
To
coin-lpsolver at list.coin-or.org
cc
Subject
[Coin-lpsolver] Precision for Clp solution
What precision can we expect for the results obtained from Clp, using
Lapack and Blas libraries on a Linux machine? Is 10e-3 too much to
expect? (I just updated my copy of COIN this morning.)
I am solving an LP (admittedly with a numerically suspect formulation,
with some coefficients smaller than 10e-10) using:
OsiClpSolverInterface *clp = new OsiClpSolverInterface;
clp->readMps("bc1.mps");
clp->initialSolve();
const double *lb = clp->getColLower();
const double *ub = clp->getColUpper();
const double *rc = clp->getReducedCost();
int ncol = clp->getNumCols();
int nrow = clp->getNumRows();
for(int i=0; i<ncol; i++) {
if((rc[i] > 1e-4) && (ub[i] - lb[i] > 1e-4) && (x[i] > lb[i] + 1e-4))
{
printf("### ERROR: var: %d rc: %f lb: %f ub: %f x: %f\n",
i, rc[i], lb[i], ub[i], x[i]);
exit(1);
}
if((rc[i] < -1e-4) && (ub[i] - lb[i] > 1e-4) && (x[i] < ub[i] -
1e-4)) {
printf("### ERROR: var: %d rc: %f lb: %f ub: %f x: %f\n",
i, rc[i], lb[i], ub[i], x[i]);
exit(1);
}
}
I get:
### ERROR: var: 8 rc: -0.002807 lb: 0.000000 ub: 10.000000 x:
0.000000
Regardless of the initial formulation, the precision of the result seems
to be at most 10e-2. The mps file bc1.mps is available from
http://plato.asu.edu/ftp/milp/
Francois
_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20060413/cf0375a7/attachment.html>
More information about the Clp
mailing list