File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5002,11 +5002,15 @@ HPresolve::Result HPresolve::enumerateSolutions(
50025002 if ((++numRowsAccepted) >= maxNumRowsChecked) break ;
50035003 // get indices of binary variables in the row
50045004 getBinaryRow (r, binvars, numnzs);
5005+ // initialise counters
5006+ HighsInt numRowsActive = 0 ;
5007+ HighsInt oldNumRowsRemoved = numRowsRemoved;
50055008 for (size_t ii = i + 1 ; ii < rows.size (); ii++) {
50065009 // get row index and skip removed rows
50075010 HighsInt& r2 = std::get<3 >(rows[ii]);
50085011 if (r2 == -1 ) continue ;
50095012 // compare signatures to see if there may be overlap
5013+ numRowsActive++;
50105014 if ((std::get<4 >(rows[i]) & std::get<4 >(rows[ii])) == 0 ) continue ;
50115015 // get indices of binary variables in the row
50125016 getBinaryRow (r2, binvars2, numnzs2);
@@ -5019,6 +5023,9 @@ HPresolve::Result HPresolve::enumerateSolutions(
50195023 r2 = -1 ;
50205024 }
50215025 }
5026+ // stop iterating if at most one of the remaining rows is active (not
5027+ // deleted)
5028+ if (numRowsActive - numRowsRemoved + oldNumRowsRemoved <= 1 ) break ;
50225029 }
50235030 if (numRowsRemoved > 0 )
50245031 rows.erase (std::remove_if (rows.begin (), rows.end (),
You can’t perform that action at this time.
0 commit comments