Skip to content

Commit 4970557

Browse files
committed
modify bad assert
1 parent b5664c1 commit 4970557

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Clp/src/OsiClp/OsiClpSolverInterface.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7531,8 +7531,11 @@ void OsiClpSolverInterface::crunch()
75317531
nBound, moreBounds, tightenBounds);
75327532
#ifndef NDEBUG
75337533
int nCopy = 3 * numberRows + 2 * numberColumns;
7534-
for (int i = 0; i < nCopy; i++)
7534+
for (int i = 0; i < nCopy; i++) {
7535+
if (i>=small->getNumRows()&&i<numberRows)
7536+
continue; // row was removed so doesn't matter
75357537
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7538+
}
75367539
#endif
75377540
smallModel_ = small;
75387541
spareArrays_ = spareArrays;
@@ -7544,8 +7547,11 @@ void OsiClpSolverInterface::crunch()
75447547
int nCopy = 3 * numberRows + 2 * numberColumns;
75457548
nBound = whichRow[nCopy];
75467549
#ifndef NDEBUG
7547-
for (int i = 0; i < nCopy; i++)
7550+
for (int i = 0; i < nCopy; i++) {
7551+
if (i>=smallModel_->getNumRows()&&i<numberRows)
7552+
continue; // row was removed so doesn't matter
75487553
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
7554+
}
75497555
#endif
75507556
small = smallModel_;
75517557
}

0 commit comments

Comments
 (0)