[Clp] Assertion `!diffUpper||fabs(diffLower-diffUpper)<1.0e-5' failed

Lasse Kliemann lasse at lassekliemann.de
Tue Oct 27 15:52:53 EDT 2015


Dear John, thanks for your help.

Further tests revealed that the error happens with newer versions as
well (I tested up to CoinAll-1.7.5) -- but only if

  -Xlinker -Rxxx

is used for building the libraries, even if xxx points to an empty
directory. Without this directive, it is fine.

So it looks more like a build problem, at least for newer versions.

John Forrest <john.forrest at fastercoin.com> writes:

> Lasse,
>
> I am unable to reproduce error using latest Osi stable 0.107.
>
> I compiled in stable 2.9/Cbc/examples so was using Clp 1.16 and 
> Coinutils 2.10
>
>
>
> John Forrest
>
> On 27/10/15 15:04, Lasse Kliemann wrote:
>> The program below will give the error:
>>
>>    ClpSolve.cpp:1792: int ClpSimplex::initialSolve(ClpSolve&):
>>    Assertion `!diffUpper||fabs(diffLower-diffUpper)<1.0e-5' failed.
>>
>> when compiled against Osi 0.97.0 or newer, but is ok for 0.96.1 or
>> older.
>>
>> The LP has n^3 variables and 3*n constraints. The matrix has three
>> 1-entries in each column, distributed in a certain pattern. This LP is
>> feasible.
>>
>> The error goes away when n < 19 or when the upper row bound is set to
>> 1.0 (matching the lower bound) or larger than 2.0.
>>
>> Could anyone please provide some insight on this? The diff between
>> 0.96.1 and 0.97.0 probably holds the answer, but I'm not qualified to
>> analyze it. Thanks!
>>
>> #include <cstring>
>> #include <OsiClpSolverInterface.hpp>
>> #include <CoinModel.hpp>
>>
>> int main() {
>>    const double ones[3] = { 1, 1, 1 };
>>    const int n = 19;             // n < 19 eliminates error
>>    const double row_upper = 1.1; // 1.000001 <= row_upper <= 2.0 gives error
>>    CoinModel model;
>>    for(int i=0; i<n; ++i)
>>      for(int j=0; j<n; ++j)
>>        for(int k=0; k<n; ++k) {
>> 	int rows[3]; rows[0]=i; rows[1]=n+j; rows[2]=2*n+k;
>> 	model.addColumn(3, rows, ones, 0.0, 1.0, 1.0);
>>        }
>>    for(int i=0; i<3*n; ++i) model.setRowBounds(i, 1.0, row_upper);
>>    OsiClpSolverInterface si;
>>    si.loadFromCoinModel(model);
>>    si.initialSolve();
>> }
>>
>
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp


-- 
Kind Regards / MfG
Dr. Lasse Kliemann
Westring 269, 24116 Kiel, Germany
E-Mail: lasse at lassekliemann.de
OpenPGP Key: 0x4296A3E08903D018
Phone: +49 162 66 88 468
Web: http://lassekliemann.de
 
Work Address:
Department of Computer Science
Kiel University
Christian-Albrechts-Platz 4
24118 Kiel, Germany
E-Mail: lki at informatik.uni-kiel.de
Phone: +49 431 880 7454
Web: https://www.informatik.uni-kiel.de/~lki


More information about the Clp mailing list