[CoinUtils] bug in CoinUtils factor/solve routines?

qli at math.wisc.edu qli at math.wisc.edu
Tue Oct 28 16:24:30 EDT 2008


Dear list members,

I am trying to exploit the factor and solve routines in CoinUtils to  
solve linear system of equations Ax = b in my project. For a  
particular problem, when I check |Ax-b|_inf I obtain a huge residual  
(3.77e08).

In order to make sure that this is indeed what Coin produced rather  
than my part of the code. I formulate the problem into an LP with a  
dummy objective so solving the LP is entirely equivalent to solving a  
linear system of equations. I start the LP from a "crash" by setting  
the columns to be basics (setBasisStatus(1's, 3's)) and called  
initialSolve() (in Osi) so that clp solves the system directly rather  
than performing pivots.

I tracked the "largestPrimalError_" in "ClpSimplex::computePrimals" at  
each refinement. I don't have scaling in my code yet so on the first  
run I turned off the scaling and the errors in "setBasisStatus" are
1.289784e+08 (first refinement) and 1.287976e+08 (second refinement)
and at the end of "initialSolve()" I got the same errors but clp quit  
with no errors and conclude optimal (why?).

Then I turn back the scaling in clp and the errors in "setBasisStatus" are:
8.970400e+02 (first refinement) and 1.109883e-07 (second refinement)
and at the end of "initialSolve()" they are:
5.859138e00 and 4.720410e-11
and clp appears to have solved the problem and quit as optimal.
However when I check the solution coming out of the code, I still got  
an error as big as 2.723204e+02.

My questions are:
1, is CoinUtils factor and solve routines not solving the system with  
no scaling? (I understand that scaling may be important but is there  
an option to turn off scaling? I did this in the code so I might be  
missing something...)
2, why does clp ignore the error and still conclude optimal?
3, is the system really solved after scaling or is the error simply  
small due to the effect of scaling?

My matrix has 10,001 rows/cols and 107617 elements. I used Osi to set  
the Basis (setBasisStatus) first and then solve the LP with  
intialSolve().

I am happy to send you the data and the code I used to solve the LP.  
Please let me know if anything is unclear. Your help will be greatly  
appreciated!

Qian Li



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the CoinUtils mailing list