From 8876f2c7a1a322b2604f6ac7093bfb840567ce77 Mon Sep 17 00:00:00 2001 From: jajhall Date: Wed, 22 Jan 2025 16:13:16 +0000 Subject: [PATCH] This might work... --- src/mip/HighsMipSolver.cpp | 13 ++++--------- src/mip/HighsMipSolverData.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/mip/HighsMipSolver.cpp b/src/mip/HighsMipSolver.cpp index 719ca54195..c6610ad403 100644 --- a/src/mip/HighsMipSolver.cpp +++ b/src/mip/HighsMipSolver.cpp @@ -223,21 +223,16 @@ void HighsMipSolver::run() { // HighsLpRelaxation for each concurrent search beyond the master // search, and a flag for whether the HighsSearch instance has a // node from which to dive - std::vector search_has_node; - std::vector search_evaluate_node_result; - std::vector multiple_search; - std::vector multiple_lp; + std::vector multiple_search; for (HighsInt iSearch = 0; iSearch < options_mip_->mip_search_concurrency; iSearch++) { - multiple_search.push_back(HighsSearch{*this, mipdata_->pseudocost}); if (iSearch == 0) { - multiple_search[iSearch].setLpRelaxation(&mipdata_->lp); + multiple_search.push_back(HighsParallelSearch{*this, mipdata_->pseudocost}); } else { - multiple_lp.push_back(HighsLpRelaxation{mipdata_->lp}); - multiple_search[iSearch].setLpRelaxation(&multiple_lp[iSearch - 1]); + multiple_search.push_back(HighsParallelSearch{*this, mipdata_->pseudocost}); } } - HighsSearch& search = multiple_search[0]; + HighsSearch& search = multiple_search[0].search; double prev_lower_bound = mipdata_->lower_bound; diff --git a/src/mip/HighsMipSolverData.h b/src/mip/HighsMipSolverData.h index 080016b9a9..35dc82305d 100644 --- a/src/mip/HighsMipSolverData.h +++ b/src/mip/HighsMipSolverData.h @@ -63,6 +63,17 @@ enum MipSolutionSource : int { kSolutionSourceCount }; +struct HighsParallelSearch { + HighsSearch::NodeResult evaluate_node_result; + HighsSearch search; + // HighsLpRelaxation lp; + HighsParallelSearch(HighsMipSolver& solver, HighsPseudocost& pseudocost) + : evaluate_node_result(HighsSearch::NodeResult::kOpen), + search(solver, pseudocost) { + // lp(lp) + } +}; + struct HighsMipSolverData { HighsMipSolver& mipsolver; HighsCutPool cutpool;