Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions check/TestPresolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ TEST_CASE("test-fuzzing", "[highs_test_presolve]") {
// if (dev_run) {
printf("\n====================\nWithout presolve\n====================\n");

const std::string model = "issue-009";
const std::string model = "issue-010";
std::string model_file = std::string(HIGHS_DIR) + "/build/OscarFuzzing/" +
model + "/" + model + ".mps";

Expand All @@ -1281,9 +1281,10 @@ TEST_CASE("test-fuzzing", "[highs_test_presolve]") {
std::string options_file =
std::string(HIGHS_DIR) + "/build/OscarFuzzing/" + model + "/options.txt";
REQUIRE(h.readOptions(options_file) == HighsStatus::kOk);
// REQUIRE(h.setOptionValue("presolve_rule_off", 1 <<
kPresolveRuleColStuffing) == HighsStatus::kOk); HighsOptions options =
h.getOptions();

// REQUIRE(h.setOptionValue("presolve_rule_off", 1 << kPresolveRuleColStuffing) == HighsStatus::kOk);

HighsOptions options = h.getOptions();

printf("\n====================\nPresolved LP\n====================\n");
h.presolve();
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HighsOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ class HighsOptions : public HighsOptionsStruct {

record_bool = new OptionRecordBool(
"use_implied_bounds_from_presolve",
"Use relaxed implied bounds from presolve", advanced,
"Use relaxed implied bounds from presolve: redundant option!", advanced,
&use_implied_bounds_from_presolve, false);
records.push_back(record_bool);

Expand Down
40 changes: 0 additions & 40 deletions highs/presolve/HPresolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7114,9 +7114,6 @@ HighsModelStatus HPresolve::run(HighsPostsolveStack& postsolve_stack) {
presolve_status_ = HighsPresolveStatus::kNotReduced;
}

if (!mipsolver && options->use_implied_bounds_from_presolve)
setRelaxedImpliedBounds();

assert(presolve_status_ != HighsPresolveStatus::kNotSet);
return HighsModelStatus::kNotset;
}
Expand Down Expand Up @@ -9578,43 +9575,6 @@ HPresolve::Result HPresolve::equalityRowAddition(
return Result::kOk;
}

void HPresolve::setRelaxedImpliedBounds() {
double hugeBound = primal_feastol / kHighsTiny;
for (HighsInt i = 0; i != model->num_col_; ++i) {
if (model->col_lower_[i] >= implColLower[i] &&
model->col_upper_[i] <= implColUpper[i])
continue;

if (std::abs(implColLower[i]) <= hugeBound) {
// if the bound is derived from a small nonzero value
// then we want to increase the margin so that we make sure
// the row it was derived from is violated if the column sits
// at this relaxed bound in the final solution.
HighsInt nzPos = findNonzero(colLowerSource[i], i);

double boundRelax = std::max(1000.0, std::abs(implColLower[i])) *
primal_feastol /
std::min(1.0, std::abs(Avalue[nzPos]));

double newLb = implColLower[i] - boundRelax;
if (newLb > model->col_lower_[i] + boundRelax)
model->col_lower_[i] = newLb;
}

if (std::abs(implColUpper[i]) <= hugeBound) {
HighsInt nzPos = findNonzero(colUpperSource[i], i);

double boundRelax = std::max(1000.0, std::abs(implColUpper[i])) *
primal_feastol /
std::min(1.0, std::abs(Avalue[nzPos]));

double newUb = implColUpper[i] + boundRelax;
if (newUb < model->col_upper_[i] - boundRelax)
model->col_upper_[i] = newUb;
}
}
}

void HPresolve::extractVarBounds(HighsInt row) {
// extract variable bound constraints from the row

Expand Down
2 changes: 0 additions & 2 deletions highs/presolve/HPresolve.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,6 @@ class HPresolve {

Result sparsify(HighsPostsolveStack& postsolve_stack);

void setRelaxedImpliedBounds();

const HighsPresolveLog& getPresolveLog() const {
return analysis_.presolve_log_;
}
Expand Down
Loading