Skip to content

Commit 34ea42c

Browse files
committed
Enforce minimum domain improvement
1 parent 6e29317 commit 34ea42c

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

highs/mip/HighsDomain.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,11 @@ void HighsDomain::changeBound(HighsDomainChange boundchg, Reason reason) {
20112011
}
20122012
}
20132013

2014-
if (!infeasible()) {
2014+
if (!infeasible() && !binary &&
2015+
(std::abs(boundchg.boundval - oldbound) - feastol()) /
2016+
std::max(feastol(), col_upper_[boundchg.column] -
2017+
col_lower_[boundchg.column]) >=
2018+
0.2) {
20152019
mipsolver->mipdata_->implications.applyPrecedenceGraph(*this, boundchg);
20162020
}
20172021
}

highs/mip/HighsImplications.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,11 @@ void HighsImplications::applyPrecedenceGraph(
930930
for (HighsInt i = start; i < end; ++i) {
931931
const HighsInt col = precedence.index_[i];
932932
const double shift = precedence.value_[i];
933+
double range = 0.2 * domain.col_upper_[col] - domain.col_lower_[col] +
934+
domain.feastol();
933935
if (boundchg.boundtype == HighsBoundType::kLower) {
934936
const double newLb = domain.col_lower_[boundchg.column] - shift;
935-
if (domain.col_lower_[col] < newLb - domain.feastol()) {
937+
if (domain.col_lower_[col] < newLb - range) {
936938
const HighsDomain::Reason reason =
937939
precedenceLbSource[i].second ? HighsDomain::Reason::modelRowUpper(
938940
precedenceLbSource[i].first)
@@ -942,7 +944,7 @@ void HighsImplications::applyPrecedenceGraph(
942944
}
943945
} else if (boundchg.boundtype == HighsBoundType::kUpper) {
944946
const double newUb = domain.col_upper_[boundchg.column] + shift;
945-
if (domain.col_upper_[col] > newUb + domain.feastol()) {
947+
if (domain.col_upper_[col] > newUb + range) {
946948
const HighsDomain::Reason reason =
947949
precedenceUbSource[i].second ? HighsDomain::Reason::modelRowUpper(
948950
precedenceUbSource[i].first)

0 commit comments

Comments
 (0)