Skip to content

Commit

Permalink
🐛 Restored some missing code in set_cover_solver::branch_and_bound_si…
Browse files Browse the repository at this point in the history
…ngle_solution
  • Loading branch information
jjmccollum committed Feb 3, 2025
1 parent 6680ed8 commit 2917ba4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/set_cover_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,15 @@ void set_cover_solver::branch_and_bound_single_solution(list<set_cover_solution>
distinct_row_sets[serialized] = solution_rows;
}
}
//Check if there is any feasible solution under the current node:
if (is_feasible(accepted | remaining)) {
//Lower-bound the cost of any solution under the current node:
float lb = bound(accepted);
//If this lower bound is strictly below the upper bound, then branch on this node:
if (lb < ub) {
branch(remaining, nodes);
}
}
}
//For each distinct set of solution rows, add a set cover solution data structure to the solutions list:
for (pair<string, Roaring> kv : distinct_row_sets) {
Expand Down

0 comments on commit 2917ba4

Please sign in to comment.