Skip to content

Commit 0e80ead

Browse files
committed
Make cutpool a pointer
1 parent 8a96182 commit 0e80ead

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

highs/mip/HighsMipSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void HighsMipSolver::run() {
138138
// Now the worker lives in mipdata.
139139
// The master worker is used in evaluateRootNode.
140140
mipdata_->workers.emplace_back(*this, mipdata_->lp, mipdata_->domain,
141-
mipdata_->cutpool, mipdata_->conflictPool);
141+
&mipdata_->cutpool, mipdata_->conflictPool);
142142

143143
HighsMipWorker& master_worker = mipdata_->workers.at(0);
144144

@@ -330,7 +330,7 @@ void HighsMipSolver::run() {
330330
options_mip_->mip_pool_soft_limit);
331331
mipdata_->workers.emplace_back(
332332
*this, mipdata_->lps.back(), mipdata_->domains.back(),
333-
mipdata_->cutpools.back(), mipdata_->conflictpools.back());
333+
&mipdata_->cutpools.back(), mipdata_->conflictpools.back());
334334
} else {
335335
mipdata_->workers[i].resetSearch();
336336
}

highs/mip/HighsMipWorker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
HighsMipWorker::HighsMipWorker(const HighsMipSolver& mipsolver__,
1414
HighsLpRelaxation& lprelax_, HighsDomain& domain,
15-
HighsCutPool& cutpool,
15+
HighsCutPool* cutpool,
1616
HighsConflictPool& conflictpool)
1717
: mipsolver_(mipsolver__),
1818
mipdata_(*mipsolver_.mipdata_.get()),
@@ -39,7 +39,7 @@ HighsMipWorker::HighsMipWorker(const HighsMipSolver& mipsolver__,
3939
// std::vector<HighsInt> AheadNeg_;
4040

4141
// add local cutpool
42-
search_ptr_->getLocalDomain().addCutpool(cutpool_);
42+
search_ptr_->getLocalDomain().addCutpool(*cutpool_);
4343
search_ptr_->getLocalDomain().addConflictPool(conflictpool_);
4444

4545
// printf(

highs/mip/HighsMipWorker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class HighsMipWorker {
2828
HighsPseudocost pseudocost_;
2929
HighsLpRelaxation& lprelaxation_;
3030
HighsDomain& globaldom_;
31-
HighsCutPool& cutpool_;
31+
HighsCutPool* cutpool_;
3232
HighsConflictPool& conflictpool_;
3333

3434
std::unique_ptr<HighsSearch> search_ptr_;
@@ -47,7 +47,7 @@ class HighsMipWorker {
4747
HighsMipWorker(const HighsMipSolver& mipsolver__,
4848
HighsLpRelaxation& lprelax_,
4949
HighsDomain& domain,
50-
HighsCutPool& cutpool,
50+
HighsCutPool* cutpool,
5151
HighsConflictPool& conflictpool);
5252

5353
~HighsMipWorker() {

highs/mip/HighsSearch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,7 @@ HighsConflictPool& HighsSearch::getConflictPool() const {
20062006
}
20072007

20082008
HighsCutPool& HighsSearch::getCutPool() const {
2009-
return mipworker.cutpool_;
2009+
return *mipworker.cutpool_;
20102010
// return mipsolver.mipdata_->cutpool;
20112011
}
20122012

highs/mip/HighsSeparation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,6 @@ void HighsSeparation::separate(HighsMipWorker& worker,
206206

207207
// mipsolver.mipdata_->cutpool.performAging();
208208
// ig: using worker cutpool
209-
worker.cutpool_.performAging();
209+
worker.cutpool_->performAging();
210210
}
211211
}

0 commit comments

Comments
 (0)