Skip to content

Commit 984c7bc

Browse files
committed
Fix potential bug in shadowscore calc
1 parent 3065eef commit 984c7bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

highs/mip/HighsSearch.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ HighsInt HighsSearch::selectBranchingCandidate(int64_t maxSbIters,
344344
shadowdowncost -= s;
345345
}
346346
else if (s > 0) {
347-
shadowupcost += s;
347+
shadowupcost -= s;
348348
}
349349
}
350-
shadowscore[k] = std::max(1e-6, shadowdowncost) *
351-
std::max(1e-6, shadowupcost);
350+
shadowscore[k] = std::max(1e-6, fabs(shadowdowncost)) *
351+
std::max(1e-6, fabs(shadowupcost));
352352
}
353353
// Store the col to index mapping (need to get edge weights from basis)
354354
auto& idx = coltoidx[col];
@@ -791,7 +791,7 @@ HighsInt HighsSearch::selectBranchingCandidate(int64_t maxSbIters,
791791
return sortscore[a] > sortscore[b];
792792
});
793793
for (HighsInt j = 0; j != numcands; j++) {
794-
if ((sortscore[perm[j]] <= sortscore[perm[0]] * 0.67) &&
794+
if ((sortscore[perm[j]] <= sortscore[perm[0]] * 0.75) &&
795795
(sortscore[perm[j]] <= sortscore[perm[0]] - 1e-6)) {
796796
numcands = j;
797797
break;

0 commit comments

Comments
 (0)