<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Gleb,<br>
<br>
You need to add<br>
msgNew1.setLogLevel(0,1);<br>
<br>
before passing in.<br>
<br>
If you do not pass in a message handler then the default one is
cloned. By default Cbc turns off the OsiSolver printing but that
doesn't matter as only that handler is changed.<br>
<br>
When you pass in a handler then it is not cloned. So OsiSolver
switches it off.<br>
<br>
The setLoglevel(0,1) tells the code that there are different
levels for different modules. 0 is Cbc - so you will get normal
output for Cbc. If you need more information e.g. on Cgl then you
would need (3,1).<br>
<br>
You could get same effect in a clumsier way - setting solver log
level up to 2 and checking in your code -<br>
<br>
if (source_=="Cbc" && currentMessage_.detail_==1)<br>
std::cerr << messageBuffer_ << std::endl;<br>
<br>
John Forrest<br>
On 28/01/16 01:26, Gleb Belov wrote:<br>
</div>
<blockquote cite="mid:56A96E3F.5070502@monash.edu" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
Have tried CbcModel::passInMessageHandler(msgNew) with msgNEw
defined either as<br>
<br>
CoinMessageHandler msgNew1(stderr);<br>
<br>
or<br>
<br>
class StderrCoinMessageHandler : public CoinMessageHandler {<br>
int print() {<br>
cerr << messageBuffer_ << endl;<br>
}<br>
void checkSeverity() {<br>
}<br>
} msgNew2;<br>
<br>
Without preprocessing, the linked code says<br>
<br>
<blockquote>Welcome to the CBC MILP Solver <br>
Version: 2.9 <br>
Build Date: Jan 28 2016 <br>
Revision Number: 2244 <br>
<br>
command line - cbc -preprocess off -solve -quit -quit (default
strategy 1)<br>
Option for preprocess changed from sos to off<br>
</blockquote>
<br>
and nothing more. With preprocessing,<br>
<br>
<blockquote>Welcome to the CBC MILP Solver <br>
Version: 2.9 <br>
Build Date: Jan 28 2016 <br>
Revision Number: 2244 <br>
<br>
command line - cbc -solve -quit -quit (default strategy 1)<br>
4 fixed, 144 tightened bounds, 987 strengthened rows, 0
substitutions<br>
0 fixed, 44 tightened bounds, 0 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 1095 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 846 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 790 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 610 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 448 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 366 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 384 strengthened rows, 0
substitutions<br>
0 fixed, 0 tightened bounds, 354 strengthened rows, 0
substitutions<br>
processed model has 1437 rows, 765 columns (765 integer (535 of
which binary)) and 9676 elements<br>
Cutoff increment increased from 1e-05 to 0.9999<br>
</blockquote>
<br>
and again nothing more... Unmodified output used to have normal
progress log.<br>
<br>
Gleb<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<br>
</body>
</html>