From 8d25472fb95ab87b71fa8acab972a8af05a3b59f Mon Sep 17 00:00:00 2001 From: Hall Date: Fri, 31 Mar 2023 16:18:13 +0100 Subject: [PATCH 1/2] Fixed 1213 --- src/mip/HighsDomain.cpp | 2 +- src/mip/HighsMipSolverData.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mip/HighsDomain.cpp b/src/mip/HighsDomain.cpp index 4147f400ab..214ceda6ba 100644 --- a/src/mip/HighsDomain.cpp +++ b/src/mip/HighsDomain.cpp @@ -1106,7 +1106,7 @@ void HighsDomain::ObjectivePropagation::propagate() { debugCheckObjectiveLower(); const double upperLimit = domain->mipsolver->mipdata_->upper_limit; - if (objectiveLower > upperLimit) { + if (numInfObjLower == 0 && objectiveLower > upperLimit) { domain->infeasible_ = true; domain->infeasible_pos = domain->domchgstack_.size(); domain->infeasible_reason = Reason::objective(); diff --git a/src/mip/HighsMipSolverData.cpp b/src/mip/HighsMipSolverData.cpp index fc456fd998..a87cf79c3f 100644 --- a/src/mip/HighsMipSolverData.cpp +++ b/src/mip/HighsMipSolverData.cpp @@ -1583,6 +1583,10 @@ void HighsMipSolverData::evaluateRootNode() { } bool HighsMipSolverData::checkLimits(int64_t nodeOffset) const { + + // ToDo Add user termination callback here - + // if (!mipsolver.submip) Callbackfor termination + const HighsOptions& options = *mipsolver.options_mip_; if (options.mip_max_nodes != kHighsIInf && From 4c508169bb4d0bbd02e09a891195c8698c1b3bd1 Mon Sep 17 00:00:00 2001 From: Hall Date: Fri, 31 Mar 2023 16:38:18 +0100 Subject: [PATCH 2/2] Formatted --- src/io/Filereader.cpp | 6 +++--- src/mip/HighsMipSolverData.cpp | 1 - src/parallel/HighsSpinMutex.h | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/io/Filereader.cpp b/src/io/Filereader.cpp index f051bfce59..f438fa8af8 100644 --- a/src/io/Filereader.cpp +++ b/src/io/Filereader.cpp @@ -42,14 +42,14 @@ Filereader* Filereader::getFilereader(const HighsLogOptions& log_options, reader = NULL; #endif // } else if (extension == "zip") { - //#ifdef ZLIB_FOUND + // #ifdef ZLIB_FOUND // extension = getFilenameExt(filename.substr(0, filename.size() - 4)); - //#else + // #else // highsLogUser(log_options, HighsLogType::kError, // "HiGHS build without zlib support. Cannot read .zip // file.\n", filename.c_str()); // reader = NULL; - //#endif + // #endif } if (extension.compare("mps") == 0) { reader = new FilereaderMps(); diff --git a/src/mip/HighsMipSolverData.cpp b/src/mip/HighsMipSolverData.cpp index a87cf79c3f..b41b66dac8 100644 --- a/src/mip/HighsMipSolverData.cpp +++ b/src/mip/HighsMipSolverData.cpp @@ -1583,7 +1583,6 @@ void HighsMipSolverData::evaluateRootNode() { } bool HighsMipSolverData::checkLimits(int64_t nodeOffset) const { - // ToDo Add user termination callback here - // if (!mipsolver.submip) Callbackfor termination diff --git a/src/parallel/HighsSpinMutex.h b/src/parallel/HighsSpinMutex.h index 47c58e639a..cbd6a3572d 100644 --- a/src/parallel/HighsSpinMutex.h +++ b/src/parallel/HighsSpinMutex.h @@ -32,6 +32,7 @@ class HighsSpinMutex { #ifdef HIGHS_HAVE_MM_PAUSE _mm_pause(); #else + // ToDo: See if this is OK on Mac M1 std::this_thread::yield(); #endif } @@ -49,4 +50,4 @@ class HighsSpinMutex { void unlock() { flag.store(false, std::memory_order_release); } }; -#endif \ No newline at end of file +#endif