Skip to content

Commit 41c8be5

Browse files
committed
Update to correct efficacy calc
1 parent b49d5b5 commit 41c8be5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ bool HighsCutGeneration::generateCut(HighsTransformedLp& transLp,
13451345
}
13461346
#endif
13471347

1348-
// Generate a lifted simple generalized flow cover cut
1348+
// Try to generate a lifted simple generalized flow cover cut
13491349
bool flowCoverSuccess = false;
13501350
std::vector<double> flowCoverVals;
13511351
std::vector<HighsInt> flowCoverInds;

highs/mip/HighsTransformedLp.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,9 +942,12 @@ bool HighsTransformedLp::cleanup(std::vector<HighsInt>& inds,
942942
double sqrnorm = 0;
943943
const std::vector<double>& lpSolution = lprelaxation.getSolution().col_value;
944944
for (HighsInt i = 0; i != numNz; ++i) {
945-
if (lpSolution[i] <=
945+
if (vals[i] >= 0 && lpSolution[i] <=
946946
mip.mipdata_->domain.col_lower_[i] + mip.mipdata_->feastol)
947947
continue;
948+
if (vals[i] < 0 && lpSolution[i] >=
949+
mip.mipdata_->domain.col_upper_[i] - mip.mipdata_->feastol)
950+
continue;
948951
viol += vals[i] * lpSolution[i];
949952
sqrnorm += vals[i] * vals[i];
950953
}

0 commit comments

Comments
 (0)