[Clp] Clp floating point overflow exception

John Forrest john.forrest at fastercoin.com
Thu Jan 5 11:47:49 EST 2017


Dave,

I managed to get values of inf but code was quite happy - what compiler 
options were you using?

If you checkout latest stable, it should be fixed - simply changed those 
default initializations to COIN_DBL_MAX*1.0e-50 in ClpSolve.cpp

John Forrest

On 05/01/17 13:10, Elwood, Dave wrote:
>
> Hi,
>
> I am using Clp 1.6.10  and getting a floating point overflow exception 
> at ClpSimplexPrimal.cpp line 1244 when calling Clp_dual (C interface) 
> with ifValuesPass = 0 and the problem given below.
>
> Just prior to line 1244 of ClpSimplexPrimal.cpp the variables lastInf, 
> lastInf3, thisInf, thisObj, lastObj, and lastObj3 are all set to 
> 1.7976931348623157e+308   (the value of COIN_DBL_MAX) via calls to 
> progress->lastInfeasibility(…) and progress->lastObjective(…).
>
> Floating point overflows then occur in the three lines of the form:
>
>       thisObj += infeasibilityCost_ * 2.0 * thisInf;          (line 
> 1239 – where infeasibilityCost_ = 10000000000.000000)
>
> This problem is infeasible and the two rows of constraints are almost 
> linearly dependent. Presumably this is causing the dual solution to 
> fail (line 5592 “problemStatus_ = 10;” of ClpSimplexDual.cpp is hit), 
> and the primal code to be tried.   I’ve previously used Clp to 
> successfully solve similar problems where the constraint matrix has 
> linearly dependent rows, this is the first time I’ve had any problem.
>
> Any help would be appreciated.  Thanks.
>
> Dave
>
> The simplest problem I’ve found (derived from a larger problem)  that 
> causes this overflow is:
>
> numcols = 5
>
> numrows =  2
>
> collb colub obj                                   Row 1 
> constraint                      Row 2 constraint
>
> 0.000000000000000e+000 2.499999478459358e-003     
> 6.750000119209290e-001 1.758912086486816e+000    -2.412456832826138e-002
>
> 0.000000000000000e+000 2.499997615814209e-003     
> 6.750000119209290e-001 -1.758912086486816e+000     2.412456832826138e-002
>
> 0.000000000000000e+000 2.500001341104507e-003     
> 6.750000119209290e-001 1.639305591583252e+000    -2.248409017920494e-002
>
> 0.000000000000000e+000 2.500001341104507e-003     
> 6.750000119209290e-001 -1.639305591583252e+000     2.248409017920494e-002
>
> 0.000000000000000e+000    2.499997615814209e-003     
> 6.750000119209290e-001 2.748087310791016e+001    -3.769172132015228e-001
>
> rowlb rowub
>
> 1.352944225072861e-002 6.439730748534203e-001
>
> 8.794582739938051e-003 9.814968082355335e-002
>
>
>
>
>
> Dave**Elwood
> Power Systems Development
>
> 4101 Arrowhead Drive
> Medina, Minnesota 55340-9457
> Phone: 763 551 0559
> Fax: 763 551 0750
> *Email:***dave.elwood at osii.com <mailto:dave.elwood at osii.com>
> *Website: **www.osii.com* 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.osii.com&d=CwMGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=-7pQasiCjQj7drZevSC58xNNIpt4FXqLLJVQ_hlAY3c&s=I6ynt2t_vzkPLXBqymuTWMH_qsG19-bJLEvOgQ-JRE4&e=> 
>
>
>
>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_mailman_listinfo_clp&d=CwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=js2M0T-3OIMIVDvokcKjokJbk0F8QOCd0mT4FsVFE88&m=-7pQasiCjQj7drZevSC58xNNIpt4FXqLLJVQ_hlAY3c&s=Gpj3qNksongE7PGkpfVvGAqY0mA88HL3p9ejb1eJK60&e=


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20170105/45c31c75/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 6732 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20170105/45c31c75/attachment-0001.gif>


More information about the Clp mailing list