@@ -171,8 +171,8 @@ void HighsCutPool::performAging() {
171171
172172 for (HighsInt i = 0 ; i != cutIndexEnd; ++i) {
173173 // Catch buffered changes (should only occur in parallel case)
174- // TODO: This misses the case where a cut is added then deleted before aging
175- // TODO: has been called once. We'd miss resetting the age in this case.
174+ // TODO MT: Misses the case where a cut is added then deleted before aging
175+ // TODO MT : has been called once. We'd miss resetting the age in this case.
176176 if (numLps_[i] > 0 && ages_[i] >= 0 ) {
177177 // Cut has been added to the LP, but age changes haven't been made
178178 --ageDistribution[ages_[i]];
@@ -245,7 +245,9 @@ void HighsCutPool::separate(const std::vector<double>& sol, HighsDomain& domain,
245245
246246 for (HighsInt i = 0 ; i < nrows; ++i) {
247247 // cuts with an age of -1 are already in the LP and are therefore skipped
248- // TODO: Parallel case here loops over cuts potentially added in current LP
248+ // TODO MT: Parallel case tries to add cuts already in current LP.
249+ // TODO MT: Inefficient. Not sure what happens if added twice.
250+ // TODO MT: The cut shouldn't have enough violation to be added though.
249251 if (ages_[i] < 0 ) continue ;
250252
251253 HighsInt start = matrix_.getRowStart (i);
@@ -402,8 +404,9 @@ void HighsCutPool::separate(const std::vector<double>& sol, HighsDomain& domain,
402404 break ;
403405 }
404406 } else {
405- // TODO MT: Is this safe for the future? If we copy an LP with a cut
406- // from a local pool then this is not thread safe
407+ // TODO MT: This assumes the cuts in the pool are not changing during,
408+ // TODO MT: this query, i.e., the worker's pool and the global pool.
409+ // TODO MT: Currently safe, but doesn't generalise to all designs.
407410 if (getParallelism (p.second , cutset.cutindices [i],
408411 cutpools[cutset.cutpools [i]]) > maxpar) {
409412 discard = true ;
@@ -498,8 +501,7 @@ void HighsCutPool::separateLpCutsAfterRestart(HighsCutSet& cutset) {
498501HighsInt HighsCutPool::addCut (const HighsMipSolver& mipsolver, HighsInt* Rindex,
499502 double * Rvalue, HighsInt Rlen, double rhs,
500503 bool integral, bool propagate,
501- bool extractCliques, bool isConflict,
502- HighsCutPool* globalpool) {
504+ bool extractCliques, bool isConflict) {
503505 mipsolver.mipdata_ ->debugSolution .checkCut (Rindex, Rvalue, Rlen, rhs);
504506
505507 sortBuffer.resize (Rlen);
@@ -527,10 +529,6 @@ HighsInt HighsCutPool::addCut(const HighsMipSolver& mipsolver, HighsInt* Rindex,
527529
528530 if (isDuplicate (h, normalization, Rindex, Rvalue, Rlen, rhs)) return -1 ;
529531
530- if (globalpool != nullptr &&
531- globalpool->isDuplicate (h, normalization, Rindex, Rvalue, Rlen, rhs))
532- return -1 ;
533-
534532 // if (Rlen > 0.15 * matrix_.numCols())
535533 // printf("cut with len %d not propagated\n", Rlen);
536534 if (propagate) {
@@ -645,6 +643,8 @@ void HighsCutPool::syncCutPool(const HighsMipSolver& mipsolver,
645643 std::vector<double > vals (Rvalue, Rvalue + Rlen);
646644 syncpool.addCut (mipsolver, idxs.data (), vals.data (), Rlen, rhs_[i],
647645 rowintegral[i]);
646+ // TODO MT: Should I check whether the cut is accepted before changing
647+ // hasSynced?
648648 hasSynced_[i] = true ;
649649 }
650650 }
0 commit comments