[Coin-lpsolver] Precision for Clp solution
John J Forrest
jjforre at us.ibm.com
Wed Apr 19 07:22:12 EDT 2006
Francois,
As you say, the formulation has some interesting numbers so in order to
solve it Clp scales the problem (I have tried in many ways and for some of
them Clp does not enjoy solving the problem and I may try and improve
performance) and while the scaled reduced costs are within tolerances the
unscaled ones are not. This is a documented (well as much as anything in
Clp is documented) feature and Clp returns a secondary status of 3 which
means scaled problem optimal, unscaled has dual infeasibilities. If you
get this status you can then set hints for OsiClp to do primal and do not
scale and then resolve. This seems to clear up dual infeasibilities.
John
Francois Margot
<fmargot at andrew.c
mu.edu> To
Sent by: coin-lpsolver at list.coin-or.org
coin-lpsolver-bou cc
nces at list.coin-or
.org Subject
[Coin-lpsolver] Precision for Clp
solution
04/10/06 10:19 AM
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
More information about the Clp
mailing list