From 9f46c0f279a01b0c778bd5ca53a6da453120d465 Mon Sep 17 00:00:00 2001 From: fwesselm Date: Tue, 14 Jan 2025 11:03:33 +0100 Subject: [PATCH 1/2] Initialize indicators in HighsCutGeneration --- src/mip/HighsCutGeneration.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mip/HighsCutGeneration.cpp b/src/mip/HighsCutGeneration.cpp index cefb63fc88..7149ea0362 100644 --- a/src/mip/HighsCutGeneration.cpp +++ b/src/mip/HighsCutGeneration.cpp @@ -215,6 +215,10 @@ void HighsCutGeneration::separateLiftedKnapsackCover() { } bool HighsCutGeneration::separateLiftedMixedBinaryCover() { + // initialize indicators + integralSupport = false; + integralCoefficients = false; + HighsInt coversize = cover.size(); std::vector S; S.resize(coversize); @@ -275,6 +279,10 @@ bool HighsCutGeneration::separateLiftedMixedBinaryCover() { } bool HighsCutGeneration::separateLiftedMixedIntegerCover() { + // initialize indicators + integralSupport = false; + integralCoefficients = false; + HighsInt coversize = cover.size(); HighsInt l = -1; @@ -501,6 +509,10 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy, using std::max; using std::sqrt; + // initialize indicators + integralSupport = false; + integralCoefficients = false; + double continuouscontribution = 0.0; double continuoussqrnorm = 0.0; From 41ebd29fb81e079412962743d893f1fc1f04a992 Mon Sep 17 00:00:00 2001 From: fwesselm Date: Tue, 14 Jan 2025 13:03:49 +0100 Subject: [PATCH 2/2] Fix warnings along the way --- src/simplex/HEkk.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/simplex/HEkk.cpp b/src/simplex/HEkk.cpp index 2dd2ff85ae..8ec311ae1a 100644 --- a/src/simplex/HEkk.cpp +++ b/src/simplex/HEkk.cpp @@ -4421,12 +4421,14 @@ void HEkk::unitBtranResidual(const HighsInt row_out, const HVector& row_ep, void HighsSimplexStats::report(FILE* file, std::string message) const { fprintf(file, "\nSimplex stats: %s\n", message.c_str()); fprintf(file, " valid = %d\n", this->valid); - fprintf(file, " iteration_count = %d\n", this->iteration_count); - fprintf(file, " num_invert = %d\n", this->num_invert); + fprintf(file, " iteration_count = %d\n", + static_cast(this->iteration_count)); + fprintf(file, " num_invert = %d\n", + static_cast(this->num_invert)); fprintf(file, " last_invert_num_el = %d\n", - this->last_invert_num_el); + static_cast(this->last_invert_num_el)); fprintf(file, " last_factored_basis_num_el = %d\n", - this->last_factored_basis_num_el); + static_cast(this->last_factored_basis_num_el)); fprintf(file, " col_aq_density = %g\n", this->col_aq_density); fprintf(file, " row_ep_density = %g\n", this->row_ep_density); fprintf(file, " row_ap_density = %g\n", this->row_ap_density);