Skip to content

Commit 5cc2de2

Browse files
committed
Enforce timeout during sub-mip creation
1 parent f7b87ae commit 5cc2de2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

highs/mip/HighsPrimalHeuristics.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,7 @@ void HighsPrimalHeuristics::RENS(HighsMipWorker& worker,
644644
}
645645

646646
targetdepth = heur.getCurrentDepth() / 2;
647-
if (targetdepth <= 1 || (!mipsolver.mipdata_->parallelLockActive() &&
648-
mipsolver.mipdata_->checkLimits())) {
647+
if (targetdepth <= 1 || worker.search_ptr_->checkLimits()) {
649648
worker.getHeurLpIterations() = new_lp_iterations;
650649
return;
651650
}
@@ -955,8 +954,7 @@ void HighsPrimalHeuristics::RINS(HighsMipWorker& worker,
955954
}
956955

957956
targetdepth = heur.getCurrentDepth() / 2;
958-
if (targetdepth <= 1 || (!mipsolver.mipdata_->parallelLockActive() &&
959-
mipsolver.mipdata_->checkLimits())) {
957+
if (targetdepth <= 1 || worker.search_ptr_->checkLimits()) {
960958
worker.getHeurLpIterations() = new_lp_iterations;
961959
return;
962960
}

0 commit comments

Comments
 (0)