Skip to content

Commit

Permalink
modify bad assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Dec 17, 2024
1 parent b5664c1 commit 4970557
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Clp/src/OsiClp/OsiClpSolverInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7531,8 +7531,11 @@ void OsiClpSolverInterface::crunch()
nBound, moreBounds, tightenBounds);
#ifndef NDEBUG
int nCopy = 3 * numberRows + 2 * numberColumns;
for (int i = 0; i < nCopy; i++)
for (int i = 0; i < nCopy; i++) {
if (i>=small->getNumRows()&&i<numberRows)
continue; // row was removed so doesn't matter
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
}
#endif
smallModel_ = small;
spareArrays_ = spareArrays;
Expand All @@ -7544,8 +7547,11 @@ void OsiClpSolverInterface::crunch()
int nCopy = 3 * numberRows + 2 * numberColumns;
nBound = whichRow[nCopy];
#ifndef NDEBUG
for (int i = 0; i < nCopy; i++)
for (int i = 0; i < nCopy; i++) {
if (i>=smallModel_->getNumRows()&&i<numberRows)
continue; // row was removed so doesn't matter
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
}
#endif
small = smallModel_;
}
Expand Down

0 comments on commit 4970557

Please sign in to comment.