<br><font size=2 face="sans-serif">Kish,</font>
<br>
<br><font size=2 face="sans-serif">You can derive from CbcStrategyDefault
and do what you want but it seems a sensible think to change the default
to pass in the CbcModel's handler. &nbsp;So I will change.</font>
<br>
<br><font size=2 face="sans-serif">Until I do - add </font>
<br>
<br><font size=2 face="sans-serif">process-&gt;passInMessageHandler(model.messageHandler());</font>
<br>
<br><font size=2 face="sans-serif">just after process is created (line
300 of CbcStrategy.cpp)</font>
<br>
<br><font size=2 face="sans-serif">and tell me if that works.</font>
<br>
<br><font size=2 face="sans-serif">Your other point about infeasible solutions
is more complicated and I will put the changes into the development branch.</font>
<br>
<br><font size=2 face="sans-serif">John Forrest</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Kish Shen &lt;kish.shen@crosscoreop.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: coin-discuss-bounces@list.coin-or.org</font>
<p><font size=1 face="sans-serif">07/07/2006 11:22 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Discussions about open source software for Operations Research &nbsp; &nbsp;
&nbsp; &nbsp;&lt;coin-discuss@list.coin-or.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">coin-discuss@list.coin-or.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Coin-discuss] Controlling printing
for CbcStrategyDefault</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
I have been controlling the printing in various Coin components by defining
a <br>
derived class of CoinMessageHandler:<br>
<br>
class DerivedHandler : public CoinMessageHandler <br>
{<br>
public:<br>
 &nbsp; &nbsp;virtual int print();<br>
};<br>
<br>
and the print() basically redirects the messages into streams that the
user <br>
could selectively control.<br>
<br>
so when I declare something like a new CbcModel, I change its message handling
<br>
to use my DerivedHandler:<br>
<br>
 &nbsp; &nbsp;CbcModel* model = lpd-&gt;lp-&gt;mipmodel;<br>
 &nbsp; &nbsp;DerivedHandler* mipMessageHandler = new DerivedHandler;<br>
 &nbsp; &nbsp;model-&gt;passInMessageHandler(mipMessageHandler);<br>
<br>
this works, except when I tried to use CbcStrategyDefault:<br>
<br>
 &nbsp; &nbsp;CbcStrategyDefault strategy(true,5,5);<br>
 &nbsp; &nbsp;strategy.setupPreProcessing(2);<br>
 &nbsp; &nbsp;model-&gt;setStrategy(strategy);<br>
<br>
when solving, this seem to generate Cgl messages that do not go through
my <br>
print handler, and there seems to be no way of adding my print handler
to <br>
whatever is generating the message (a CglPreProcess?).<br>
<br>
The only way I can control the message is to use the setupPrinting() method:<br>
<br>
 &nbsp; &nbsp; strategy.setupPrinting(*model, 0);<br>
<br>
but this is not what I need. It would be nice if there is some way of passing
<br>
in a print handler here, rather than just control the log level. Can this
be <br>
done?<br>
<br>
Thanks in advance for any help!<br>
<br>
<br>
Cheers,<br>
<br>
Kish<br>
<br>
<br>
_______________________________________________<br>
Coin-discuss mailing list<br>
Coin-discuss@list.coin-or.org<br>
http://list.coin-or.org/mailman/listinfo/coin-discuss<br>
</font></tt>
<br>