Skip to content

Commit d828de6

Browse files
committed
Fix minor bugs. Comment out confusing code"
1 parent 341b2c9 commit d828de6

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

highs/mip/HighsDomain.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,10 +2065,11 @@ void HighsDomain::changeBound(HighsDomainChange boundchg, Reason reason) {
20652065
// but when I try the condition below breaks lseu and I don't know why yet
20662066
// MT: This code should be alright. It only uses the clique table.
20672067
// (It doesn't modify anything but the domain?)
2068-
// if (mipsolver->mipdata_->workers.size() <= 1)
2069-
// TODO: Parallel lock should not be needed here..... Tests fail though.
2070-
mipsolver->mipdata_->cliquetable.addImplications(
2071-
*this, boundchg.column, col_lower_[boundchg.column] > 0.5);
2068+
if (mipsolver->mipdata_->workers.size() <= 1) {
2069+
// TODO: Parallel lock should not be needed here..... Tests fail though.
2070+
mipsolver->mipdata_->cliquetable.addImplications(
2071+
*this, boundchg.column, col_lower_[boundchg.column] > 0.5);
2072+
}
20722073
}
20732074

20742075
void HighsDomain::setDomainChangeStack(

highs/mip/HighsMipSolver.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,6 @@ void HighsMipSolver::run() {
591591
mipdata_->workers[search_indices[i]].search_ptr_->evaluateNode();
592592
});
593593
} else {
594-
mipdata_->debugSolution.resetDomain(
595-
mipdata_->workers[search_indices[i]].search_ptr_->getLocalDomain());
596-
mipdata_->debugSolution.registerDomain(
597-
mipdata_->workers[search_indices[i]].search_ptr_->getLocalDomain());
598594
search_results[i] =
599595
mipdata_->workers[search_indices[i]].search_ptr_->evaluateNode();
600596
}
@@ -937,6 +933,10 @@ void HighsMipSolver::run() {
937933
mipdata_->workers[i].search_ptr_->currentNodePruned()) {
938934
dive_times[i] = -1;
939935
} else {
936+
mipdata_->debugSolution.resetDomain(
937+
mipdata_->workers[i].search_ptr_->getLocalDomain());
938+
mipdata_->debugSolution.registerDomain(
939+
mipdata_->workers[i].search_ptr_->getLocalDomain());
940940
dive_results[i] = mipdata_->workers[i].search_ptr_->dive();
941941
dive_times[i] += analysis_.mipTimerRead(kMipClockNodeSearch);
942942
}
@@ -947,7 +947,7 @@ void HighsMipSolver::run() {
947947
dive_times[i] = -1;
948948
} else {
949949
mipdata_->debugSolution.resetDomain(
950-
mipdata_->workers[i].search_ptr_->getLocalDomain());
950+
mipdata_->workers[i].search_ptr_->getLocalDomain());
951951
mipdata_->debugSolution.resetDomain(
952952
mipdata_->workers[i].search_ptr_->getLocalDomain());
953953
dive_results[i] = mipdata_->workers[i].search_ptr_->dive();
@@ -1244,7 +1244,13 @@ void HighsMipSolver::run() {
12441244
if (limit_or_infeas.first) limit_reached = true;
12451245
if (limit_or_infeas.first || limit_or_infeas.second) break;
12461246
// TODO MT: If everything was pruned then do a global sync!
1247-
if (search_indices.empty()) continue;
1247+
if (search_indices.empty()) {
1248+
if (mipdata_->hasMultipleWorkers()) {
1249+
resetWorkerDomains();
1250+
resetGlobalDomain();
1251+
}
1252+
continue;
1253+
}
12481254

12491255
bool infeasible = separateAndStoreBasis(search_indices);
12501256
if (infeasible) break;

0 commit comments

Comments
 (0)