Skip to content

Commit 76ad3b6

Browse files
committed
After setting info.bounds_shifted = true when shifting in HEkkPrimal::phase2UpdatePrimal get no scaled primal infeasibilities, but one unscaled, hence dual simplex correction
1 parent ddb053e commit 76ad3b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

highs/simplex/HEkkPrimal.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,8 +1968,12 @@ void HEkkPrimal::phase2UpdatePrimal(const bool initialise) {
19681968
// ignored. If they aren't ignored, then violations lead to either
19691969
// identification of infeasibilities (and return to Phase 1) or
19701970
// shifting of bounds to accommodate them.
1971+
//
1972+
// primal_correction_strategy is defined (const) as
1973+
// kSimplexPrimalCorrectionStrategyAlways
19711974
const bool ignore_bounds =
19721975
primal_correction_strategy == kSimplexPrimalCorrectionStrategyInRebuild;
1976+
assert(primal_correction_strategy == kSimplexPrimalCorrectionStrategyAlways);
19731977
HighsInt to_entry;
19741978
const bool use_col_indices = ekk_instance_.simplex_nla_.sparseLoopStyle(
19751979
col_aq.count, num_row, to_entry);
@@ -1990,6 +1994,8 @@ void HEkkPrimal::phase2UpdatePrimal(const bool initialise) {
19901994
if (!bound_violated) continue;
19911995
// A bound is violated
19921996
if (primal_correction_strategy == kSimplexPrimalCorrectionStrategyNone) {
1997+
// Not used
1998+
assert(111 == 222);
19931999
// @primal_infeasibility calculation
19942000
double primal_infeasibility;
19952001
if (bound_violated < 0) {
@@ -2004,6 +2010,8 @@ void HEkkPrimal::phase2UpdatePrimal(const bool initialise) {
20042010
primal_infeasible = true;
20052011
}
20062012
} else if (ignore_bounds) {
2013+
// Not used
2014+
assert(111 == 333);
20072015
double ignored_violation;
20082016
if (bound_violated < 0) {
20092017
ignored_violation = lower - value;
@@ -2029,6 +2037,7 @@ void HEkkPrimal::phase2UpdatePrimal(const bool initialise) {
20292037
info.baseLower_[iRow] = info.workLower_[iCol];
20302038
info.workLowerShift_[iCol] += bound_shift;
20312039
}
2040+
info.bounds_shifted = true;
20322041
assert(bound_shift > 0);
20332042
}
20342043
}

0 commit comments

Comments
 (0)