@@ -1398,7 +1398,7 @@ bool HighsCutGeneration::generateCut(HighsTransformedLp& transLp,
13981398 // try to generate a cut
13991399 if (!tryGenerateCut (
14001400 inds_, vals_, hasUnboundedInts, hasGeneralInts, hasContinuous,
1401- std::max (flowCoverEfficacy - ( 10 * feastol) , 10 * feastol),
1401+ std::max (0.9 * flowCoverEfficacy , 10 * feastol),
14021402 onlyInitialCMIRScale)) {
14031403 cmirSuccess = false ;
14041404 goto postprocess;
@@ -1597,6 +1597,9 @@ bool HighsCutGeneration::preprocessSNFRelaxation() {
15971597 // 4. Don't consider any inequality with too many non-zeros
15981598 // 5. Don't consider any inequality with too few continuous cols
15991599
1600+ HighsInt maxLen = 100 + 0.05 * (lpRelaxation.numCols ());
1601+ if (rowlen > maxLen) return false ;
1602+
16001603 HighsInt numZeros = 0 ;
16011604 HighsInt numContCols = 0 ;
16021605 double maxact = -feastol;
@@ -1655,9 +1658,6 @@ bool HighsCutGeneration::preprocessSNFRelaxation() {
16551658 }
16561659 }
16571660
1658- HighsInt maxLen = 100 + 0.15 * (lpRelaxation.numCols ());
1659- if (rowlen - numZeros > maxLen) return false ;
1660-
16611661 if (numZeros != 0 ) {
16621662 // remove zeros in place
16631663 for (HighsInt i = rowlen - 1 ; i >= 0 ; --i) {
@@ -1689,10 +1689,8 @@ bool HighsCutGeneration::computeFlowCover() {
16891689 if (abs (snfr.vubCoef [i]) < feastol) {
16901690 snfr.flowCoverStatus [i] = -1 ;
16911691 nNonFlowCover++;
1692- continue ;
1693- }
1694- // x_i is fractional -> becomes an item in knapsack (decides if in cover)
1695- if (fractionality (snfr.binSolval [i]) > feastol) {
1692+ } else if (fractionality (snfr.binSolval [i]) > feastol) {
1693+ // x_i is fractional -> becomes an item in knapsack (decides if in cover)
16961694 items[nitems] = i;
16971695 nitems++;
16981696 if (snfr.coef [i] == 1 ) {
@@ -1736,8 +1734,6 @@ bool HighsCutGeneration::computeFlowCover() {
17361734 double knapsackWeight = 0 ;
17371735 std::vector<double > weights (nitems);
17381736 std::vector<double > profitweightratios (nitems);
1739- std::vector<HighsInt> perm (nitems);
1740- std::iota (perm.begin (), perm.end (), 0 );
17411737 for (HighsInt i = 0 ; i < nitems; ++i) {
17421738 weights[i] = snfr.vubCoef [items[i]];
17431739 if (snfr.coef [items[i]] == 1 ) {
@@ -1746,6 +1742,8 @@ bool HighsCutGeneration::computeFlowCover() {
17461742 profitweightratios[i] = snfr.binSolval [items[i]] / weights[i];
17471743 }
17481744 }
1745+ std::vector<HighsInt> perm (nitems);
1746+ std::iota (perm.begin (), perm.end (), 0 );
17491747 pdqsort_branchless (perm.begin (), perm.end (),
17501748 [&](const HighsInt a, const HighsInt b) {
17511749 return profitweightratios[a] > profitweightratios[b];
0 commit comments