<br><font size=2 face="sans-serif">Lasse,</font>
<br>
<br><font size=2 face="sans-serif">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. &nbsp;I have updated Clp/examples/addRows.cpp
to create a model from scratch. &nbsp;The example matrix is built by column.
&nbsp;You could build by row and then transpose before handing to model.</font>
<br>
<br><font size=2 face="sans-serif">Hope the example is clear enough (Clp
trunk).</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr>
<td><img src=cid:_1_06180768061803800057F7BC852573D4>
<td width=100%>
<table width=100%>
<tr valign=top>
<td width=100%><font size=2 face="sans-serif"><b>Re: [Coin-lpsolver] Best
way to bring an instance into CLP?</b></font></table>
<br>
<table width=100%>
<tr>
<td><font size=2 color=#e26200 face="sans-serif"><b>Lasse Kliemann </b></font>
<td><font size=2 color=#8f8f8f face="sans-serif">to:</font>
<td><font size=2 face="sans-serif">coin-lpsolver</font>
<td>
<div align=right><font size=1 face="sans-serif">01/18/2008 08:20 AM</font></div></table>
<br>
<table width=100%>
<tr>
<td>
<table width=100%>
<tr>
<td><font size=2 color=#8f8f8f face="sans-serif">Sent by:</font>
<td width=100%><font size=2 color=#e26200 face="sans-serif"><b>coin-lpsolver-bounces@list.coin-or.org</b></font></table>
<br>
<td>
<div align=right></div></table>
<br></table>
<br>
<br>
<hr>
<br>
<br>
<br><tt><font size=2>* Message by -Lasse Kliemann- from Fri 2008-01-18:<br>
&gt; There are so many ways to bring an LP into the CLP solver.<br>
&gt; <br>
&gt; I figured out at least the following:<br>
&gt; <br>
&gt; <br>
&gt; 1) CoinPackedMatrix --&gt; ClpModel (via loadProblem)<br>
&gt; <br>
&gt; 2) CoinModel --&gt; ClpModel (via loadProblem)<br>
&gt; <br>
&gt; 3) CoinBuild --&gt; CoinModel (via addColumns or addRows) <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--&gt; ClpModel (via
loadProblem)<br>
&gt; <br>
&gt; 4) CoinBuild --&gt; ClpModel (via addColumns or addRows) <br>
&gt; <br>
&gt; 5) CoinPackedMatrix --&gt; OsiClpSolverInterface (via loadProblem)<br>
&gt; <br>
&gt; 6) CoinModel --&gt; OsiClpSolverInterface (via loadFromCoinModel)<br>
&gt; <br>
&gt; 7) CoinBuild --&gt; CoinModel (via addColumns or addRows) <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;--&gt; OsiClpSolverInterface
(via loadFromCoinModel)<br>
 <br>
Oh, there are even more:<br>
<br>
9) CoinBuild --&gt; OsiClpSolverInterface (via addRows or addCols)<br>
<br>
And we can also load rows or columns given by vectors of indices and elements
<br>
(what I assumed to be the starting point all the time) directly into ClpModel
<br>
or OsiClpSolverInterface via addRow or addCol.<br>
 <br>
<br>
&gt; Which of these is the best in terms of memory usage?<br>
&gt; Which is the best in terms of runtime efficiency?<br>
&gt; <br>
&gt; As far as I understood, CoinBuild helps to boost runtime efficiency.
Hence, <br>
&gt; number 3 or number 7 could be the fastest solution. However, memory
usage is <br>
&gt; an issue in my application.<br>
&gt; <br>
&gt; So far, I've been using alternative number 6, which I found pretty
fast <br>
&gt; already (even without the use of CoinBuild). The program aborts with
'out of <br>
&gt; memory' on instances of a certain size. These instances can be solved,
<br>
&gt; however, when loaded directly into GLPK; I have not tried loading
them <br>
&gt; directly into CLP yet. Before I try all possible ways to find out
the best, <br>
&gt; maybe someone can give me a hint.<br>
&gt; <br>
&gt; Thanks a lot for your advice!<br>
&gt; <br>
&gt; Lasse<br>
_______________________________________________<br>
Coin-lpsolver mailing list<br>
Coin-lpsolver@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-lpsolver<br>
</font></tt>
<br>