[Coin-lpsolver] Best way to bring an instance into CLP?

John J Forrest jjforre at us.ibm.com
Fri Jan 18 11:01:01 EST 2008


Lasse,

If memory is an issue the most efficient way takes more effort but is 
doable if you have a reasonable (over)estimate of numbers of rows, columns 
and elements.  I have updated Clp/examples/addRows.cpp to create a model 
from scratch.  The example matrix is built by column.  You could build by 
row and then transpose before handing to model.

Hope the example is clear enough (Clp trunk).

John Forrest





Re: [Coin-lpsolver] Best way to bring an instance into CLP?

Lasse Kliemann 
to:
coin-lpsolver
01/18/2008 08:20 AM


Sent by:
coin-lpsolver-bounces at list.coin-or.org







* Message by -Lasse Kliemann- from Fri 2008-01-18:
> There are so many ways to bring an LP into the CLP solver.
> 
> I figured out at least the following:
> 
> 
> 1) CoinPackedMatrix --> ClpModel (via loadProblem)
> 
> 2) CoinModel --> ClpModel (via loadProblem)
> 
> 3) CoinBuild --> CoinModel (via addColumns or addRows) 
>              --> ClpModel (via loadProblem)
> 
> 4) CoinBuild --> ClpModel (via addColumns or addRows) 
> 
> 5) CoinPackedMatrix --> OsiClpSolverInterface (via loadProblem)
> 
> 6) CoinModel --> OsiClpSolverInterface (via loadFromCoinModel)
> 
> 7) CoinBuild --> CoinModel (via addColumns or addRows) 
>              --> OsiClpSolverInterface (via loadFromCoinModel)
 
Oh, there are even more:

9) CoinBuild --> OsiClpSolverInterface (via addRows or addCols)

And we can also load rows or columns given by vectors of indices and 
elements 
(what I assumed to be the starting point all the time) directly into 
ClpModel 
or OsiClpSolverInterface via addRow or addCol.
 

> Which of these is the best in terms of memory usage?
> Which is the best in terms of runtime efficiency?
> 
> As far as I understood, CoinBuild helps to boost runtime efficiency. 
Hence, 
> number 3 or number 7 could be the fastest solution. However, memory 
usage is 
> an issue in my application.
> 
> So far, I've been using alternative number 6, which I found pretty fast 
> already (even without the use of CoinBuild). The program aborts with 
'out of 
> memory' on instances of a certain size. These instances can be solved, 
> however, when loaded directly into GLPK; I have not tried loading them 
> directly into CLP yet. Before I try all possible ways to find out the 
best, 
> maybe someone can give me a hint.
> 
> Thanks a lot for your advice!
> 
> Lasse
_______________________________________________
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/20080118/616096fd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attu3ezb.dat
Type: application/octet-stream
Size: 844 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20080118/616096fd/attachment.obj>


More information about the Clp mailing list