From 0ca6b8804a528e2842da69982acc3157e568c7df Mon Sep 17 00:00:00 2001 From: JAJHall Date: Mon, 26 Aug 2024 16:44:46 +0100 Subject: [PATCH 1/5] Added code to switch on logging for check_run_call --- src/lp_data/HighsIis.cpp | 21 ++++++++++++++++++++- src/lp_data/HighsIis.h | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/lp_data/HighsIis.cpp b/src/lp_data/HighsIis.cpp index 9f244415ca..dc5c3e911f 100644 --- a/src/lp_data/HighsIis.cpp +++ b/src/lp_data/HighsIis.cpp @@ -248,12 +248,32 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, HighsInt iX = -1; bool drop_lower = false; + HighsInt num_run_call = 0; + const HighsInt check_run_call = kHighsIInf; + // Lambda for gathering data when solving an LP auto solveLp = [&]() -> HighsStatus { HighsIisInfo iis_info; iis_info.simplex_time = -highs.getRunTime(); iis_info.simplex_iterations = -info.simplex_iteration_count; + bool output_flag; + highs.getOptionValue("output_flag", output_flag); + HighsInt log_dev_level; + highs.getOptionValue("log_dev_level", log_dev_level); + + num_run_call++; + if (num_run_call >= check_run_call) { + highs.setOptionValue("output_flag", true); + highs.setOptionValue("log_dev_level", 2); + } run_status = highs.run(); + highs.setOptionValue("output_flag", output_flag); + highs.setOptionValue("log_dev_level", log_dev_level); + if (run_status != HighsStatus::kOk) { + printf("HighsIis::compute highs.run() %d returns status %s\n", + int(num_run_call), + highsStatusToString(run_status).c_str()); + } assert(run_status == HighsStatus::kOk); if (run_status != HighsStatus::kOk) return run_status; HighsModelStatus model_status = highs.getModelStatus(); @@ -262,7 +282,6 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, printf("\nHighsIis::compute %s deletion for %d and %s bound\n", row_deletion ? "Row" : "Col", int(iX), drop_lower ? "Lower" : "Upper"); - bool output_flag; highs.getOptionValue("output_flag", output_flag); highs.setOptionValue("output_flag", true); HighsInt simplex_strategy; diff --git a/src/lp_data/HighsIis.h b/src/lp_data/HighsIis.h index cb01ea3500..f49665de32 100644 --- a/src/lp_data/HighsIis.h +++ b/src/lp_data/HighsIis.h @@ -16,7 +16,7 @@ #include "lp_data/HighsLp.h" -const bool kIisDevReport = false; +const bool kIisDevReport = true; enum IisBoundStatus { kIisBoundStatusDropped = -1, From 076cb9a99ddfb904e57ebfe24c4ff3c10f88030f Mon Sep 17 00:00:00 2001 From: JAJHall Date: Mon, 26 Aug 2024 18:14:23 +0100 Subject: [PATCH 2/5] Some progress, but cplex2 is horrible! --- src/lp_data/HighsIis.cpp | 5 ++- src/lp_data/HighsInterface.cpp | 60 +++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/lp_data/HighsIis.cpp b/src/lp_data/HighsIis.cpp index dc5c3e911f..ce645d8775 100644 --- a/src/lp_data/HighsIis.cpp +++ b/src/lp_data/HighsIis.cpp @@ -260,7 +260,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, highs.getOptionValue("output_flag", output_flag); HighsInt log_dev_level; highs.getOptionValue("log_dev_level", log_dev_level); - + num_run_call++; if (num_run_call >= check_run_call) { highs.setOptionValue("output_flag", true); @@ -271,8 +271,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, highs.setOptionValue("log_dev_level", log_dev_level); if (run_status != HighsStatus::kOk) { printf("HighsIis::compute highs.run() %d returns status %s\n", - int(num_run_call), - highsStatusToString(run_status).c_str()); + int(num_run_call), highsStatusToString(run_status).c_str()); } assert(run_status == HighsStatus::kOk); if (run_status != HighsStatus::kOk) return run_status; diff --git a/src/lp_data/HighsInterface.cpp b/src/lp_data/HighsInterface.cpp index 6176c39bf1..765568ad56 100644 --- a/src/lp_data/HighsInterface.cpp +++ b/src/lp_data/HighsInterface.cpp @@ -2058,49 +2058,61 @@ HighsStatus Highs::elasticityFilter( // Now fix e-variables that are positive and re-solve until e-LP is infeasible HighsInt loop_k = 0; bool feasible_model = false; + // Use strict zero solution value rather than within tolerance since + // cplex2 is almost feasible, and only requires an elastic variable + // value of 8.87022e-10 to be feasible. + const double use_primal_tolerance = 0; for (;;) { if (kIisDevReport) printf("\nElasticity filter pass %d\n==============\n", int(loop_k)); + // An elastic variable can be fixed at zero, but have positive + // value (within the tolerance) if basic, so allowing it to be + // re-fixed can cause an infinite loop. Happens with cplex2 when + // fixed elastic variable is basic at 8.87022e-10 HighsInt num_fixed = 0; if (has_elastic_columns) { for (HighsInt eCol = 0; eCol < col_of_ecol.size(); eCol++) { - HighsInt iCol = col_of_ecol[eCol]; - if (solution.col_value[col_ecol_offset + eCol] > - this->options_.primal_feasibility_tolerance) { + const HighsInt iCol = col_ecol_offset + eCol; + if (lp.col_upper_[iCol] == 0) continue; + const HighsInt original_col = col_of_ecol[eCol]; + if (solution.col_value[iCol] > use_primal_tolerance) { if (kIisDevReport) printf( "E-col %2d (column %2d) corresponds to column %2d with bound " "%g " "and has solution value %g\n", - int(eCol), int(col_ecol_offset + eCol), int(iCol), - bound_of_col_of_ecol[eCol], - solution.col_value[col_ecol_offset + eCol]); - this->changeColBounds(col_ecol_offset + eCol, 0, 0); + int(eCol), int(iCol), int(original_col), + bound_of_col_of_ecol[eCol], solution.col_value[iCol]); + this->changeColBounds(iCol, 0, 0); num_fixed++; } } } if (has_elastic_rows) { for (HighsInt eCol = 0; eCol < row_of_ecol.size(); eCol++) { - HighsInt iRow = row_of_ecol[eCol]; - if (solution.col_value[row_ecol_offset + eCol] > - this->options_.primal_feasibility_tolerance) { + const HighsInt iCol = row_ecol_offset + eCol; + if (lp.col_upper_[iCol] == 0) continue; + const HighsInt original_row = row_of_ecol[eCol]; + if (solution.col_value[iCol] > use_primal_tolerance) { if (kIisDevReport) printf( "E-row %2d (column %2d) corresponds to row %2d with bound " "%g " "and has solution value %g\n", - int(eCol), int(row_ecol_offset + eCol), int(iRow), - bound_of_row_of_ecol[eCol], - solution.col_value[row_ecol_offset + eCol]); - this->changeColBounds(row_ecol_offset + eCol, 0, 0); + int(eCol), int(iCol), int(original_row), + bound_of_row_of_ecol[eCol], solution.col_value[iCol]); + this->changeColBounds(iCol, 0, 0); num_fixed++; } } } if (num_fixed == 0) { - // No elastic variables were positive, so problem is feasible - feasible_model = true; + // No new elastic variables were fixed, so break. If this was + // the first pass, then the original problem is feasible. If the + // original problem is feasible, its model status cannot be set + // so, according to the truth of feasible_model, this will be + // done in elasticityFilterReturn. + feasible_model = loop_k == 0; break; } HighsStatus run_status = solveLp(); @@ -2120,29 +2132,31 @@ HighsStatus Highs::elasticityFilter( HighsInt num_enforced_row_ecol = 0; if (has_elastic_columns) { for (HighsInt eCol = 0; eCol < col_of_ecol.size(); eCol++) { - HighsInt iCol = col_of_ecol[eCol]; - if (lp.col_upper_[col_ecol_offset + eCol] == 0) { + const HighsInt original_col = col_of_ecol[eCol]; + const HighsInt iCol = col_ecol_offset + eCol; + if (lp.col_upper_[iCol] == 0) { num_enforced_col_ecol++; printf( "Col e-col %2d (column %2d) corresponds to column %2d with bound " "%g " "and is enforced\n", - int(eCol), int(col_ecol_offset + eCol), int(iCol), + int(eCol), int(iCol), int(original_col), bound_of_col_of_ecol[eCol]); } } } if (has_elastic_rows) { for (HighsInt eCol = 0; eCol < row_of_ecol.size(); eCol++) { - HighsInt iRow = row_of_ecol[eCol]; - if (lp.col_upper_[row_ecol_offset + eCol] == 0) { + const HighsInt original_row = row_of_ecol[eCol]; + const HighsInt iCol = row_ecol_offset + eCol; + if (lp.col_upper_[iCol] == 0) { num_enforced_row_ecol++; - infeasible_row_subset.push_back(iRow); + infeasible_row_subset.push_back(original_row); if (kIisDevReport) printf( "Row e-col %2d (column %2d) corresponds to row %2d with bound " "%g and is enforced\n", - int(eCol), int(row_ecol_offset + eCol), int(iRow), + int(eCol), int(iCol), int(original_row), bound_of_row_of_ecol[eCol]); } } From 414e9ce7f14decfb3b7060096364dda84a7c8511 Mon Sep 17 00:00:00 2001 From: jajhall Date: Tue, 27 Aug 2024 15:33:29 +0100 Subject: [PATCH 3/5] Now to refine kIisDevReport --- src/lp_data/HighsIis.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/lp_data/HighsIis.cpp b/src/lp_data/HighsIis.cpp index ce645d8775..fe0371d195 100644 --- a/src/lp_data/HighsIis.cpp +++ b/src/lp_data/HighsIis.cpp @@ -249,7 +249,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, bool drop_lower = false; HighsInt num_run_call = 0; - const HighsInt check_run_call = kHighsIInf; + const HighsInt check_run_call = 153;//kHighsIInf; // Lambda for gathering data when solving an LP auto solveLp = [&]() -> HighsStatus { @@ -257,18 +257,23 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, iis_info.simplex_time = -highs.getRunTime(); iis_info.simplex_iterations = -info.simplex_iteration_count; bool output_flag; - highs.getOptionValue("output_flag", output_flag); HighsInt log_dev_level; + HighsInt highs_analysis_level; + highs.getOptionValue("output_flag", output_flag); highs.getOptionValue("log_dev_level", log_dev_level); + highs.getOptionValue("highs_analysis_level", highs_analysis_level); num_run_call++; - if (num_run_call >= check_run_call) { + if (num_run_call == check_run_call) { highs.setOptionValue("output_flag", true); - highs.setOptionValue("log_dev_level", 2); + highs.setOptionValue("log_dev_level", 3); + highs.setOptionValue("highs_analysis_level", 4); + highs.writeModel("form.mps"); } run_status = highs.run(); highs.setOptionValue("output_flag", output_flag); highs.setOptionValue("log_dev_level", log_dev_level); + highs.setOptionValue("highs_analysis_level", highs_analysis_level); if (run_status != HighsStatus::kOk) { printf("HighsIis::compute highs.run() %d returns status %s\n", int(num_run_call), highsStatusToString(run_status).c_str()); @@ -378,6 +383,8 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, // Pass twice: rows before columns, or columns before rows, according to // row_priority + std::string check_type = "Col"; + HighsInt check_ix = 81; for (HighsInt k = 0; k < 2; k++) { row_deletion = (row_priority && k == 0) || (!row_priority && k == 1); std::string type = row_deletion ? "Row" : "Col"; @@ -393,6 +400,9 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, double upper = row_deletion ? lp.row_upper_[iX] : lp.col_upper_[iX]; // Record whether the upper bound has been dropped due to the lower bound // being kept + if (check_type == type && check_ix == iX) { + printf("CheckType %s, index %d, num_run_call = %d\n", check_type.c_str(), int(check_ix), int(num_run_call)); + } if (lower > -kHighsInf) { // Drop the lower bound temporarily bool drop_lower = true; From 236506d78778e4b27044ed9212f229dc3f4e17ec Mon Sep 17 00:00:00 2001 From: jajhall Date: Tue, 27 Aug 2024 17:41:09 +0100 Subject: [PATCH 4/5] Distinguished kIisDevReportVerbose and kIisDevReportBrief, and added to reporting --- src/lp_data/HighsIis.cpp | 14 +++++++------- src/lp_data/HighsIis.h | 3 ++- src/lp_data/HighsInterface.cpp | 35 ++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/lp_data/HighsIis.cpp b/src/lp_data/HighsIis.cpp index fe0371d195..ac05276a4d 100644 --- a/src/lp_data/HighsIis.cpp +++ b/src/lp_data/HighsIis.cpp @@ -211,7 +211,7 @@ HighsStatus HighsIis::getData(const HighsLp& lp, const HighsOptions& options, this->col_index_[iCol] = from_col[this->col_index_[iCol]]; for (HighsInt iRow = 0; iRow < HighsInt(this->row_index_.size()); iRow++) this->row_index_[iRow] = from_row[this->row_index_[iRow]]; - if (kIisDevReport) this->report("On exit", lp); + if (kIisDevReportVerbose) this->report("On exit", lp); return HighsStatus::kOk; } @@ -226,7 +226,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) this->addRow(iRow); Highs highs; const HighsInfo& info = highs.getInfo(); - highs.setOptionValue("output_flag", kIisDevReport); + highs.setOptionValue("output_flag", kIisDevReportVerbose); highs.setOptionValue("presolve", kHighsOffString); const HighsLp& incumbent_lp = highs.getLp(); const HighsBasis& incumbent_basis = highs.getBasis(); @@ -249,7 +249,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, bool drop_lower = false; HighsInt num_run_call = 0; - const HighsInt check_run_call = 153;//kHighsIInf; + const HighsInt check_run_call = 154;//kHighsIInf; // Lambda for gathering data when solving an LP auto solveLp = [&]() -> HighsStatus { @@ -401,7 +401,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, // Record whether the upper bound has been dropped due to the lower bound // being kept if (check_type == type && check_ix == iX) { - printf("CheckType %s, index %d, num_run_call = %d\n", check_type.c_str(), int(check_ix), int(num_run_call)); + printf("CheckType %s, index %d, will be num_run_call = %d\n", check_type.c_str(), int(check_ix), int(num_run_call+1)); } if (lower > -kHighsInf) { // Drop the lower bound temporarily @@ -517,7 +517,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, } if (k == 1) continue; // End of first pass: look to simplify second pass - if (kIisDevReport) this->report("End of deletion", incumbent_lp); + if (kIisDevReportVerbose) this->report("End of deletion", incumbent_lp); if (row_deletion) { // Mark empty columns as dropped for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) { @@ -539,9 +539,9 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, } } } - if (kIisDevReport) this->report("End of pass 1", incumbent_lp); + if (kIisDevReportVerbose) this->report("End of pass 1", incumbent_lp); } - if (kIisDevReport) this->report("End of pass 2", incumbent_lp); + if (kIisDevReportVerbose) this->report("End of pass 2", incumbent_lp); HighsInt iss_num_col = 0; for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) { if (this->col_bound_[iCol] != kIisBoundStatusDropped) { diff --git a/src/lp_data/HighsIis.h b/src/lp_data/HighsIis.h index f49665de32..65fdb1fa5b 100644 --- a/src/lp_data/HighsIis.h +++ b/src/lp_data/HighsIis.h @@ -16,7 +16,8 @@ #include "lp_data/HighsLp.h" -const bool kIisDevReport = true; +const bool kIisDevReportBrief = true; +const bool kIisDevReportVerbose = false; enum IisBoundStatus { kIisBoundStatusDropped = -1, diff --git a/src/lp_data/HighsInterface.cpp b/src/lp_data/HighsInterface.cpp index 765568ad56..a32b4e4462 100644 --- a/src/lp_data/HighsInterface.cpp +++ b/src/lp_data/HighsInterface.cpp @@ -1821,13 +1821,15 @@ HighsStatus Highs::elasticityFilter( const bool has_elastic_rows = has_local_rhs_penalty || has_global_elastic_rhs; assert(has_elastic_columns || has_elastic_rows); + const bool has_col_names = lp.col_names_.size() > 0; + const bool has_row_names = lp.row_names_.size() > 0; + const HighsInt col_ecol_offset = lp.num_col_; if (has_elastic_columns) { // Accumulate bounds to be used for columns std::vector col_lower; std::vector col_upper; // When defining names, need to know the column number - const bool has_col_names = lp.col_names_.size() > 0; erow_start.push_back(0); for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) { const double lower = lp.col_lower_[iCol]; @@ -1901,7 +1903,7 @@ HighsStatus Highs::elasticityFilter( HighsInt num_new_col = col_of_ecol.size(); HighsInt num_new_row = erow_start.size() - 1; HighsInt num_new_nz = erow_start[num_new_row]; - if (kIisDevReport) + if (kIisDevReportBrief) printf( "Elasticity filter: For columns there are %d variables and %d " "constraints\n", @@ -1954,7 +1956,6 @@ HighsStatus Highs::elasticityFilter( std::vector ecol_index; std::vector ecol_value; ecol_start.push_back(0); - const bool has_row_names = lp.row_names_.size() > 0; for (HighsInt iRow = 0; iRow < original_num_row; iRow++) { // Get the penalty for violating the bounds on this row const double penalty = @@ -2044,7 +2045,7 @@ HighsStatus Highs::elasticityFilter( original_num_row, original_col_cost, original_col_lower, original_col_upper, original_integrality); - if (kIisDevReport) this->writeSolution("", kSolutionStylePretty); + if (kIisDevReportVerbose) this->writeSolution("", kSolutionStylePretty); // Model status should be optimal, unless model is unbounded assert(this->model_status_ == HighsModelStatus::kOptimal || this->model_status_ == HighsModelStatus::kUnbounded); @@ -2063,7 +2064,7 @@ HighsStatus Highs::elasticityFilter( // value of 8.87022e-10 to be feasible. const double use_primal_tolerance = 0; for (;;) { - if (kIisDevReport) + if (kIisDevReportBrief) printf("\nElasticity filter pass %d\n==============\n", int(loop_k)); // An elastic variable can be fixed at zero, but have positive // value (within the tolerance) if basic, so allowing it to be @@ -2076,7 +2077,7 @@ HighsStatus Highs::elasticityFilter( if (lp.col_upper_[iCol] == 0) continue; const HighsInt original_col = col_of_ecol[eCol]; if (solution.col_value[iCol] > use_primal_tolerance) { - if (kIisDevReport) + if (kIisDevReportBrief) printf( "E-col %2d (column %2d) corresponds to column %2d with bound " "%g " @@ -2094,7 +2095,7 @@ HighsStatus Highs::elasticityFilter( if (lp.col_upper_[iCol] == 0) continue; const HighsInt original_row = row_of_ecol[eCol]; if (solution.col_value[iCol] > use_primal_tolerance) { - if (kIisDevReport) + if (kIisDevReportBrief) printf( "E-row %2d (column %2d) corresponds to row %2d with bound " "%g " @@ -2121,7 +2122,7 @@ HighsStatus Highs::elasticityFilter( original_num_col, original_num_row, original_col_cost, original_col_lower, original_col_upper, original_integrality); - if (kIisDevReport) this->writeSolution("", kSolutionStylePretty); + if (kIisDevReportVerbose) this->writeSolution("", kSolutionStylePretty); HighsModelStatus model_status = this->getModelStatus(); if (model_status == HighsModelStatus::kInfeasible) break; loop_k++; @@ -2137,26 +2138,32 @@ HighsStatus Highs::elasticityFilter( if (lp.col_upper_[iCol] == 0) { num_enforced_col_ecol++; printf( - "Col e-col %2d (column %2d) corresponds to column %2d with bound " - "%g " + "Col e-col %4d (column %4d) corresponds to column %4d (%8s) with bound " + "%11.4g " "and is enforced\n", int(eCol), int(iCol), int(original_col), + has_col_names ? lp.col_names_[original_col].c_str(): "", bound_of_col_of_ecol[eCol]); } } } if (has_elastic_rows) { + std::vector in_infeasible_row_subset; + in_infeasible_row_subset.assign(original_num_row, false); for (HighsInt eCol = 0; eCol < row_of_ecol.size(); eCol++) { const HighsInt original_row = row_of_ecol[eCol]; + assert(original_row < original_num_row); const HighsInt iCol = row_ecol_offset + eCol; if (lp.col_upper_[iCol] == 0) { + assert(!in_infeasible_row_subset[original_row]); num_enforced_row_ecol++; infeasible_row_subset.push_back(original_row); - if (kIisDevReport) + if (kIisDevReportBrief) printf( - "Row e-col %2d (column %2d) corresponds to row %2d with bound " - "%g and is enforced\n", + "Row e-col %4d (column %4d) corresponds to row %4d (%8s) with bound %11.4g " + "and is enforced\n", int(eCol), int(iCol), int(original_row), + has_row_names ? lp.row_names_[original_row].c_str(): "", bound_of_row_of_ecol[eCol]); } } @@ -2170,7 +2177,7 @@ HighsStatus Highs::elasticityFilter( "rows\n", int(loop_k), int(num_enforced_col_ecol), int(num_enforced_row_ecol)); - if (kIisDevReport) + if (kIisDevReportBrief) printf( "\nElasticity filter after %d passes enforces bounds on %d cols and %d " "rows\n", From 17e59ae5515276b5479093dfb249cf4690099601 Mon Sep 17 00:00:00 2001 From: JAJHall Date: Wed, 28 Aug 2024 21:38:10 +0100 Subject: [PATCH 5/5] Formatted --- src/lp_data/HighsIis.cpp | 11 ++++++----- src/lp_data/HighsInterface.cpp | 14 ++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/lp_data/HighsIis.cpp b/src/lp_data/HighsIis.cpp index ac05276a4d..50fef4e969 100644 --- a/src/lp_data/HighsIis.cpp +++ b/src/lp_data/HighsIis.cpp @@ -249,7 +249,7 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, bool drop_lower = false; HighsInt num_run_call = 0; - const HighsInt check_run_call = 154;//kHighsIInf; + const HighsInt check_run_call = 154; // kHighsIInf; // Lambda for gathering data when solving an LP auto solveLp = [&]() -> HighsStatus { @@ -258,10 +258,10 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, iis_info.simplex_iterations = -info.simplex_iteration_count; bool output_flag; HighsInt log_dev_level; - HighsInt highs_analysis_level; - highs.getOptionValue("output_flag", output_flag); + HighsInt highs_analysis_level; + highs.getOptionValue("output_flag", output_flag); highs.getOptionValue("log_dev_level", log_dev_level); - highs.getOptionValue("highs_analysis_level", highs_analysis_level); + highs.getOptionValue("highs_analysis_level", highs_analysis_level); num_run_call++; if (num_run_call == check_run_call) { @@ -401,7 +401,8 @@ HighsStatus HighsIis::compute(const HighsLp& lp, const HighsOptions& options, // Record whether the upper bound has been dropped due to the lower bound // being kept if (check_type == type && check_ix == iX) { - printf("CheckType %s, index %d, will be num_run_call = %d\n", check_type.c_str(), int(check_ix), int(num_run_call+1)); + printf("CheckType %s, index %d, will be num_run_call = %d\n", + check_type.c_str(), int(check_ix), int(num_run_call + 1)); } if (lower > -kHighsInf) { // Drop the lower bound temporarily diff --git a/src/lp_data/HighsInterface.cpp b/src/lp_data/HighsInterface.cpp index a32b4e4462..3eded75ac8 100644 --- a/src/lp_data/HighsInterface.cpp +++ b/src/lp_data/HighsInterface.cpp @@ -2138,11 +2138,12 @@ HighsStatus Highs::elasticityFilter( if (lp.col_upper_[iCol] == 0) { num_enforced_col_ecol++; printf( - "Col e-col %4d (column %4d) corresponds to column %4d (%8s) with bound " + "Col e-col %4d (column %4d) corresponds to column %4d (%8s) with " + "bound " "%11.4g " "and is enforced\n", int(eCol), int(iCol), int(original_col), - has_col_names ? lp.col_names_[original_col].c_str(): "", + has_col_names ? lp.col_names_[original_col].c_str() : "", bound_of_col_of_ecol[eCol]); } } @@ -2155,15 +2156,16 @@ HighsStatus Highs::elasticityFilter( assert(original_row < original_num_row); const HighsInt iCol = row_ecol_offset + eCol; if (lp.col_upper_[iCol] == 0) { - assert(!in_infeasible_row_subset[original_row]); + assert(!in_infeasible_row_subset[original_row]); num_enforced_row_ecol++; infeasible_row_subset.push_back(original_row); if (kIisDevReportBrief) printf( - "Row e-col %4d (column %4d) corresponds to row %4d (%8s) with bound %11.4g " - "and is enforced\n", + "Row e-col %4d (column %4d) corresponds to row %4d (%8s) with " + "bound %11.4g " + "and is enforced\n", int(eCol), int(iCol), int(original_row), - has_row_names ? lp.row_names_[original_row].c_str(): "", + has_row_names ? lp.row_names_[original_row].c_str() : "", bound_of_row_of_ecol[eCol]); } }