[Cbc] CbcSolver printing directly to stdout

John Forrest john.forrest at fastercoin.com
Fri Aug 29 02:15:34 EDT 2014


Kish,

Will try and get it done by Monday (i.e. via message handler).

John

On 28/08/14 20:10, Kish Shen wrote:
> Hi,
>
> I have not heard back on this. I would greatly appreciate any 
> help/information on this.
>
> Perhaps I was not very clear in my last message, so let me try and 
> give some more context:
>
> We use CbcSolver from within our own system (ECLiPSe -- a Prolog 
> system, where the user can write their program in ECLiPSe that 
> interfaces to Cbc), via the C++ API, i.e.  CbcSolver is called via 
> CbcMain() and CbcMain1() etc. We also define a derived handler from 
> CoinMessageHandler to handle the output from that CbcSolver send via 
> its messageHandler. This allows the user to control the way output 
> from CbcSolver is handled.
>
> In addition to not being able to control the output handling, there is 
> an additional problem with printing to std::cout in the way we use 
> CbcSolver, as std::cout may actually not be used in our system 
> (depending on how the user is using our system), and the output may 
> then appear elsewhere (e.g. in the process that ECLiPSe was started 
> from), or not at all.
>
> Looking at CbcSolver.cpp, I think some of the direct printing to 
> std:cout are only relevant if CbcSolver is used as a stand-alone 
> solver, but this is not the case for 'Problem is infeasible!' message 
> -- so are there any reason that these messages sent to std::cout, 
> rather using messageHanlder? Should they be changed to using 
> messageHandler instead?
>
> Thanks in advance for any help/information!
>
> Cheers,
>
> Kish
>
> On 21/08/2014 02:07, Kish Shen wrote:
>> Hi,
>>
>> One of our user reported that he is seeing a 'Problem is infeasible!'
>> message from Cbc for some infeasible problems.
>>
>> He does not want to see messages during the solve, and has set the
>> system to suppressed all output, but this only works with output handled
>> via CoinMessageHandler.
>>
>> I checked for 'Problem is infeasible!', and it occurs twice in
>> CbcSolver.cpp, and in both cases, the message is sent directly to
>> std::cout, rather than using CoinMessageHandler. These are bracketed by
>>
>> #ifndef DISALLOW_PRINTING
>>
>> Should these messages be handled via CoinMessageHandler, or should I
>> compile Cbc with -DDISALLOW_PRINTING?
>>
>> I am using Cbc stable/2.8 that I downloaded on March 12 2014. Our user
>> also said that he did not see the message when he used aan earlier
>> version of Cbc.
>>
>> In relation to versions, is there anyway to get the versions of
>> Cbc/Clp/OSI etc. via the API? This would be useful information to print
>> out when we load Cbc/Clp. I remember asking this a few years ago, and at
>> the time this information was not available via the API.
>>
>> Thanks in advance for any help/information!
>>
>> Cheers,
>>
>> Kish
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/cbc
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
>



More information about the Cbc mailing list