<br>
<br><tt><font size=2>coin-discuss-bounces@list.coin-or.org wrote on 11/08/2006
10:33:01 AM:<br>
<br>
&gt; Hi all,<br>
&gt; <br>
&gt; I used CbcMain.cpp as an example for constructing my own solver.<br>
&gt; All compiled fine but I don't understand the methods preProcess and
<br>
&gt; postProcess from the class CglPreProcess:<br>
&gt; <br>
&gt; OsiSolverInterface * preProcess( OsiSolverInterface &amp; model, bool
<br>
&gt; makeEquality=false, int numberPasses=5)<br>
&gt; void postProcess(OsiSolverInterface &amp;model);<br>
&gt;</font></tt>
<br>
<br><tt><font size=2>You might do better to use sample2.cpp rather than
CbcMain.cpp (or CoinSolve.cpp).</font></tt>
<br><tt><font size=2>The idea is (non Cbc specific) that you can do certain
things once to try and improve model. &nbsp;So preProcess does repeated
normal presolves, tries to fix variables but also finds duplicate rows
and tries to strengthen constraints etc etc. &nbsp;</font></tt>
<br>
<br><tt><font size=2>If you prefer you can pass in CbcStrategy to CbcModel
to do preprocessing inside CbcModel. &nbsp;You should find that a lot simpler
(again see sample2.cpp). &nbsp;You could also use the magic -cpp 0 option
to generate a driver (from &quot;cbc&quot;).</font></tt>
<br><tt><font size=2><br>
&gt; More specific I have the following questions:<br>
&gt; <br>
&gt; - Should preProcess be called before or after adding cut generators
to the <br>
&gt; model?</font></tt>
<br>
<br><tt><font size=2>I don't think it makes any difference with any of
the current cut generators. &nbsp;Unless you need to know structure before,
you might as well do it after.<br>
&gt; <br>
&gt; - Why is the first parameter of preProcess called &quot;model&quot;
while it is a <br>
&gt; solver?</font></tt>
<br>
<br><tt><font size=2>Well it really is an LP model - but I agree. <br>
&gt; I find this confusing because at the moment I call preProcess I have
already <br>
&gt; assigned a solver to my CbcModel.</font></tt>
<br>
<br><tt><font size=2>Better to assign it afterwards as CbcModel clones
the solver it is given.</font></tt>
<br>
<br><tt><font size=2>I apologize for preprocessing being a bit of a mess
but some things were difficult with OsiSolverInterface lacking features.</font></tt>
<br>
<br><tt><font size=2>John Forrest</font></tt>
<br><tt><font size=2><br>
</font></tt>