Skip to content

Commit

Permalink
Boolean indicators are uninitialized when cover finding fails (- this…
Browse files Browse the repository at this point in the history
… does not cause incorrect behavior)
  • Loading branch information
fwesselm committed Jan 21, 2025
1 parent 4546f1b commit 6552600
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/mip/HighsCutGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,8 @@ bool HighsCutGeneration::tryGenerateCut(std::vector<HighsInt>& inds_,
// the lifting functions have minimality of the cover as necessary facet
// condition
bool success = false;
bool saveIntegalSupport = false;
bool saveIntegralCoefficients = false;
do {
if (!determineCover(lpSol)) break;

Expand All @@ -1409,6 +1411,11 @@ bool HighsCutGeneration::tryGenerateCut(std::vector<HighsInt>& inds_,

double minMirEfficacy = minEfficacy;
if (success) {
// save data that might otherwise be overwritten when calling the cmir
// separator
saveIntegalSupport = integralSupport;
saveIntegralCoefficients = integralCoefficients;

// compute violation and squared norm
double violation = -double(rhs);
double sqrnorm = 0.0;
Expand All @@ -1434,11 +1441,6 @@ bool HighsCutGeneration::tryGenerateCut(std::vector<HighsInt>& inds_,
inds = tmpInds.data();
vals = tmpVals.data();

// save data that might otherwise be overwritten when calling the cmir
// separator
bool saveIntegalSupport = integralSupport;
bool saveIntegralCoefficients = integralCoefficients;

if (cmirCutGenerationHeuristic(minMirEfficacy, onlyInitialCMIRScale)) {
// take the cmir cut as it is better
inds_.swap(tmpInds);
Expand Down

0 comments on commit 6552600

Please sign in to comment.