[Cbc] Increase number of digits in solution file
nicolas.derhy at engie.com
nicolas.derhy at engie.com
Wed Oct 4 05:57:27 EDT 2017
Thank you very much.
It works perfectly !
Nicolas
De : John Forrest [mailto:john.forrest at fastercoin.com]
Envoyé : mercredi 4 octobre 2017 10:19
À : Derhy Nicolas (ENGIE SA) <nicolas.derhy at engie.com>
Cc : cbc at list.coin-or.org
Objet : Re: [Cbc] Increase number of digits in solution file
Nicolas,
Give up and do it the incorrect way. Don't try and define CLP_OUTPUT_FORMAT.
Go to line 58 (about) in CbcSolver.cpp and change the line
#define CLP_OUTPUT_FORMAT %15.8g
to whatever you want.
John Forrest
On 03/10/17 14:01, nicolas.derhy at engie.com<mailto:nicolas.derhy at engie.com> wrote:
Hi,
I followed your advice and I tried to add #define CLP_OUTPUT_FORMAT "%20.12g" in Clp/src/config_default.h but it has no effect.
Then I tried to change compile parameters but did not know exactly what to do : I modified preprocessor definitions by adding CLP_OUTPUT_FORMAT=%20.12g; but no effect.
I tried with quote (CLP_OUTPUT_FORMAT=”%20.12g”;), I tried on different vs projects (cbc, libCbc and libClp) but it was unsuccessful…
When I watch the resulting command line, it seems that percent symbol is not well recognized because I obtain : /D "CLP_OUTPUT_FORMAT=\" .12g\""
If anyone can give me more details, it would be great !
Nicolas
De : Fausto Richetti Blanco [mailto:fausto.blanco at gmail.com]
Envoyé : jeudi 21 septembre 2017 18:59
À : John Forrest <john.forrest at fastercoin.com><mailto:john.forrest at fastercoin.com>
Cc : Derhy Nicolas (ENGIE SA) <nicolas.derhy at engie.com><mailto:nicolas.derhy at engie.com>; cbc <cbc at list.coin-or.org><mailto:cbc at list.coin-or.org>
Objet : Re: [Cbc] Increase number of digits in solution file
I think you can add -DCLP_OUTPUT_FORMAT ="%20.12g" to the compiler parameters in the project settings of visual studio
On Thu, Sep 21, 2017 at 1:05 PM, John Forrest <john.forrest at fastercoin.com<mailto:john.forrest at fastercoin.com>> wrote:
Nicolas,
I only use Linux, so maybe someone else can help.
I think that for Visual Studio you have to modify Clp/src/config_default.h by hand. If so then I would try adding #define CLP_OUTPUT_FORMAT ="%20.12g". I am not sure if you need the "". I hope someone will correct me if I am wrong.
John Forrest
On 21/09/17 14:24, nicolas.derhy at engie.com<mailto:nicolas.derhy at engie.com> wrote:
Hi John,
Can you explain me how to do this ?
I have downloaded source code and I compiled it successfully (using Visual Studio 2010).
I found some CXXDEFS in the configure file but I do not know what to modify.
Nicolas
De : Cbc [mailto:cbc-bounces at coin-or.org] De la part de John Forrest
Envoyé : mardi 19 septembre 2017 18:57
À : cbc at list.coin-or.org<mailto:cbc at list.coin-or.org>
Objet : Re: [Cbc] Increase number of digits in solution file
Nicolas,
When you configure cbc add to CXXDEFS
-DCLP_OUTPUT_FORMAT ="%20.12g"
or whatever you want.
John Forrest
On 19/09/17 16:02, nicolas.derhy at engie.com<mailto:nicolas.derhy at engie.com> wrote:
Hi everybody,
I often use cbc exe. It works very well and each time I use it, I add to the command line “-solution mySolution.txt” in order to recuperate the optimal solution.
My problem is that the values stored in the solution file lacked sometimes of precision when I need a lot of digits.
For example, I recently obtained 1.5596969e+008 whereas I was hoping for 155969687.
I tried several options like –output but I did not find any option that will fit my expectations.
Is there a way to increase the number of digits in solution file ?
Nicolas
ENGIE Mail Disclaimer: http://www.engie.com/disclaimer/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.engie.com_disclaimer_&d=DwQFAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=anc8oE2IRL39guSdrbI6atT3s0V2ObFOaTDgJHLf9-c&s=mjNThllnDqmDRcNqpqksHEfbKv9yhq5d4f8mdpJscRs&e=>
_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=anc8oE2IRL39guSdrbI6atT3s0V2ObFOaTDgJHLf9-c&s=WQyrZaz7e_48jLExsKGJZLzrV8DuJrdS4pbnzRZCLhM&e=
ENGIE Mail Disclaimer: http://www.engie.com/disclaimer/<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.engie.com_disclaimer_&d=DwMD-g&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=QLQl3jHZx6hPNKTb0I9pud73uBDZjSYyVOorevkAFrU&m=twctdVqG8x_S3LcNeNMh_E3U3_cH9YdWaXeaESUBOE0&s=IEjdcmffNopDjU_gWPBZ0fyonrmKskqA_k2C5Fqd_AA&e=>
_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org<mailto:Cbc at list.coin-or.org>
https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=QLQl3jHZx6hPNKTb0I9pud73uBDZjSYyVOorevkAFrU&m=twctdVqG8x_S3LcNeNMh_E3U3_cH9YdWaXeaESUBOE0&s=tX_0lqmYf6lgmM238Sh7IWf8BgFrOAG2c7GepHYA_tU&e=
ENGIE Mail Disclaimer: http://www.engie.com/disclaimer/
ENGIE Mail Disclaimer: http://www.engie.com/disclaimer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20171004/53e3d706/attachment-0001.html>
More information about the Cbc
mailing list