Cbc
Cbc copied to clipboard
precision in solution file "all"
Hi,
im testing with cbc solution files and my model.
CBC.exe "model.mps"
-directory "%Temp%"
-solve
-printingOptions all -solution "all.cbc"
-printingOptions allcsv -solution "allcsv.cbc"
with model.mps i want y23 = 12345.670000
This is how cbc solves it. But when I add the values from x1 to x36 from "all.cbc", the result is 12345.66996
cbc uses
#define CLP_OUTPUT_FORMAT % 15.8g
I assume precision with "g" means: Precision specifies the maximum number of significant digits output. 15 characters but only 8 significant digits.
Since the current format is certainly used by many, I have created an additional "allcsv" format in which the values are separated by commas and "%.15g" is used.
Please check my changes.
I think the output could also be used for other outputs such as "normal" and "rows"?
Since pulp also uses the "all" format, I'm a little surprised that the accuracy there was sufficient.
Thank you for your great work.