Skip to content

Commit 5479e92

Browse files
committed
Added check that there is exactly one node on the queue to start with
1 parent e9d5c6c commit 5479e92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

highs/mip/HighsMipSolver.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ HighsMipSolver::HighsMipSolver(HighsCallback& callback,
6868
HighsMipSolver::~HighsMipSolver() = default;
6969

7070
void HighsMipSolver::run() {
71+
const bool debug_logging = false; // true;
7172
modelstatus_ = HighsModelStatus::kNotset;
7273

7374
if (submip) {
@@ -279,6 +280,16 @@ void HighsMipSolver::run() {
279280
mipdata_->upper_bound);
280281

281282
mipdata_->printDisplayLine();
283+
int64_t num_nodes = mipdata_->nodequeue.numNodes();
284+
if (num_nodes > 1) {
285+
// Should be exactly one node on the queue?
286+
if (debug_logging)
287+
printf(
288+
"HighsMipSolver::run() popping node from nodequeue with %d > 1 "
289+
"nodes\n",
290+
HighsInt(num_nodes));
291+
assert(num_nodes == 1);
292+
}
282293

283294
search.installNode(mipdata_->nodequeue.popBestBoundNode());
284295
int64_t numStallNodes = 0;

0 commit comments

Comments
 (0)