Skip to content

Commit

Permalink
Merge pull request #1497 from guifcoelho/fix/branch_and_price_prune_n…
Browse files Browse the repository at this point in the history
…ode_when_rmp_is_feasible

Issue 1496
  • Loading branch information
jajhall committed Nov 10, 2023
2 parents 58e8254 + 913fe6d commit 806a56a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/branch-and-price.py
Expand Up @@ -366,12 +366,9 @@ def branchAndPrice(m, vals, columns, start_time=0):
mp_is_feasible, m, node = solveNode(node, columns, m)
count_nodes_visited += 1

# Prune nodes that cannot lead to optimal solution
if node.value >= best_obj:
continue

# Only add columns if the master problem is feasible
if mp_is_feasible:
# Prune nodes that cannot lead to optimal solution
if mp_is_feasible and node.value < best_obj:
columns = node.final_columns
count_fractional_columns = len(node.final_fractional_columns)

Expand Down

0 comments on commit 806a56a

Please sign in to comment.