Skip to content

Commit 353896d

Browse files
committed
Add search_started flag
1 parent 9d6291b commit 353896d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

highs/mip/HighsDomain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,8 @@ void HighsDomain::changeBound(HighsDomainChange boundchg, Reason reason) {
20592059
if (binary && !infeasible_ && isFixed(boundchg.column))
20602060
// tried to only modify cliquetable before the dive
20612061
// but when I try the condition below breaks lseu and I don't know why yet
2062+
// MT: This code should be alright. It only uses the clique table.
2063+
// (It doesn't modify anything but the domain?)
20622064
// if (mipsolver->mipdata_->workers.size() <= 1)
20632065
mipsolver->mipdata_->cliquetable.addImplications(
20642066
*this, boundchg.column, col_lower_[boundchg.column] > 0.5);

highs/mip/HighsMipSolver.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ void HighsMipSolver::run() {
142142
HighsMipWorker& master_worker = mipdata_->workers.at(0);
143143

144144
restart:
145+
search_started = false;
145146
if (modelstatus_ == HighsModelStatus::kNotset) {
146147
// Check limits have not been reached before evaluating root node
147148
if (mipdata_->checkLimits()) {
@@ -308,10 +309,12 @@ void HighsMipSolver::run() {
308309
// Initialize worker relaxations and mipworkers
309310
// todo lps and workers are still empty right now
310311

312+
search_started = true;
311313
const HighsInt mip_search_concurrency = options_mip_->mip_search_concurrency;
312314
const HighsInt num_worker = mip_search_concurrency - 1;
315+
313316
for (int i = 0; i < num_worker; i++) {
314-
mipdata_->lps.push_back(HighsLpRelaxation(*this));
317+
mipdata_->lps.emplace_back(*this);
315318
mipdata_->workers.emplace_back(*this, mipdata_->lps.back());
316319
}
317320

highs/mip/HighsMipSolver.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ class HighsMipSolver {
5656

5757
HighsMipAnalysis analysis_;
5858

59+
// concurrency related information
60+
bool search_started;
61+
5962
void run();
6063

6164
HighsInt numCol() const { return model_->num_col_; }

0 commit comments

Comments
 (0)