Skip to content

Commit 4955990

Browse files
authored
Merge pull request #2698 from ERGO-Code/fix-num-var-bound
Fix incorrect decrement value
2 parents 960231e + f9441d1 commit 4955990

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

highs/mip/HighsImplications.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,11 @@ void HighsImplications::cleanupVarbounds(HighsInt col) {
715715
double lb = mipsolver.mipdata_->domain.col_lower_[col];
716716

717717
if (ub == lb) {
718-
numVarBounds -= vlbs.size();
719-
numVarBounds -= vubs.size();
718+
HighsInt numVubs = 0;
719+
vubs[col].for_each([&](HighsInt vubCol, VarBound& vub) { numVubs++; });
720+
HighsInt numVlbs = 0;
721+
vlbs[col].for_each([&](HighsInt vlbCol, VarBound& vlb) { numVlbs++; });
722+
numVarBounds -= numVubs + numVlbs;
720723
vlbs[col].clear();
721724
vubs[col].clear();
722725
return;

0 commit comments

Comments
 (0)