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

Lasse Kliemann lasse at lassekliemann.de
Tue Oct 27 11:04:57 EDT 2015


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();
}

-- 
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