[Clp] about double type variable value in solution

John Forrest john.forrest at fastercoin.com
Sun Jun 21 12:30:13 EDT 2015


I have added a ClpSimplex::cleanPrimalSolution(double exactMultiple) - 
you will use 1.0

to trunk.  I am not sure I am allowed to add new functions to stable.

If you are not using trunk then just copy ClpSimplex.?pp from trunk - or 
I can send you code.

Tell me if that works.

John Forrest

On 20/06/15 20:50, Emerson wrote:
> Hi,
> I'm testing a network flow problem but encounter a float-point 
> headache. The output is something like the following:
> "~/MultiCommodityFlowTest.cpp:444: Failure
> Value of: linkMap.at(make_pair(0, 3))
>   Actual: 9.9986685597741598e-13
> Expected: 0
> "
> Previously, I used glpk and nothing is wrong when using google unit 
> test(EXPECT_EQ). But Clp still has a couple of floating-point numbers 
> failures s even I use EXPECT_DOUBLE_EQ or EXPECT_FLOAT_EQ.
> I think the reason is that glpk uses some default post-processing 
> method to handle the value of variable in solution, but Clp doesn't 
> have this process.
> Is there a way that Clp can round the solution to a reasonable value 
> rather than the above value?
>
> Thanks,
> Emer
>
> p.s. Thanks John for the last reply, I have changed the way to build a 
> constraint matrix from glpk to Clp, and it works better than the former.
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20150621/be9da891/attachment.html>


More information about the Clp mailing list