Skip to content

Commit

Permalink
This might work...
Browse files Browse the repository at this point in the history
  • Loading branch information
jajhall committed Jan 22, 2025
1 parent 3e507f6 commit 8876f2c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/mip/HighsMipSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> search_has_node;
std::vector<HighsSearch::NodeResult> search_evaluate_node_result;
std::vector<HighsSearch> multiple_search;
std::vector<HighsLpRelaxation> multiple_lp;
std::vector<HighsParallelSearch> 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;

Expand Down
11 changes: 11 additions & 0 deletions src/mip/HighsMipSolverData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8876f2c

Please sign in to comment.