Skip to content

Commit 629c4b8

Browse files
committed
Add const_boundchg_threshold
1 parent 6af72c2 commit 629c4b8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

highs/mip/HighsDomain.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static inline double boundRange(double upper_bound, double lower_bound,
6262
double tolerance, HighsVarType var_type) {
6363
double range = upper_bound - lower_bound;
6464
return range - (var_type == HighsVarType::kContinuous
65-
? std::max(0.2 * range, 1000.0 * tolerance)
65+
? std::max(HighsDomain::cont_boundchg_threshold * range,
66+
1000.0 * tolerance)
6667
: tolerance);
6768
}
6869

@@ -1353,7 +1354,7 @@ double HighsDomain::adjustedUb(HighsInt col, HighsCDouble boundVal,
13531354
else
13541355
relativeImprove /=
13551356
std::max(std::fabs(col_upper_[col]), std::fabs(bound));
1356-
accept = relativeImprove >= 0.2;
1357+
accept = relativeImprove >= cont_boundchg_threshold;
13571358
} else
13581359
accept = false;
13591360
}
@@ -1385,7 +1386,7 @@ double HighsDomain::adjustedLb(HighsInt col, HighsCDouble boundVal,
13851386
else
13861387
relativeImprove /=
13871388
std::max(std::fabs(col_lower_[col]), std::fabs(bound));
1388-
accept = relativeImprove >= 0.2;
1389+
accept = relativeImprove >= cont_boundchg_threshold;
13891390
} else
13901391
accept = false;
13911392
}

highs/mip/HighsDomain.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ class HighsDomain {
339339
std::vector<double> col_lower_;
340340
std::vector<double> col_upper_;
341341

342+
static constexpr double cont_boundchg_threshold = 0.2;
343+
342344
HighsDomain(HighsMipSolver& mipsolver);
343345

344346
HighsDomain(const HighsDomain& other)

0 commit comments

Comments
 (0)