[Coin-lpsolver] Problem creation performance
François Galea
Francois.Galea at prism.uvsq.fr
Fri Feb 4 03:15:38 EST 2005
Hi !
I have a question concerning the Clp library API.
I need to generate different LPs (my previous question about QPs has no
relation with this problem), whose size is about 2500 rows, 2500 columns
and 250000 non-zeros. The model is such that it's easier for me to
create an empty problem object using the ClpSimplex() constructor :
ClpSimplex * simplex = new ClpSimplex();
then I populate it column-wise, by first performing a series of calls
like this:
simplex->addRows( rcnt, lb, ub, rowstarts, NULL, NULL );
then I add the columns by a series of this kind of calls :
simplex->addColumns( 1, &lb, &ub, &objcoef, colstarts, ind, val );
This leads to a major problem, that the creation of the problem is much
slower than its resolution. Maybe Clp is more performant when creating
simplex objects row-wise than column-wise, but I really need to create
my problem objects this way.
Most of the examples I found in the Clp documentation create ClpSimplex
objects by reading MPS files, and the only one I found that creates an
object from scratch provides the whole simplex matrix at once, which is
okay when you can easily find the size of the problem before creating
the object, but it not okay for me.
Could I get a link to a more complete documentation than the one I found
in the Clp website, which only mentions the addRows and addColumns
methods once ? Or can anybody tell me why I get such a low model
creation speed, and how to make things faster ?
Thanks for the help,
François Galea
More information about the Clp
mailing list