Skip to content

Commit

Permalink
Actually change all_ba_pruned flag
Browse files Browse the repository at this point in the history
  • Loading branch information
bkraske committed Jun 21, 2024
1 parent d76d454 commit 7aeffdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/prune.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,16 @@ function prune!(tree::SARSOPTree)
Qa_lower = tree.Qa_lower[b_idx]
b_children = tree.b_children[b_idx]
max_lower_bound = maximum(Qa_lower)

all_ba_pruned = true
for (idx, Qba) enumerate(Qa_upper)
all_ba_pruned = true
ba_idx = b_children[idx]
if !tree.ba_pruned[ba_idx] && Qba < max_lower_bound
pruneSubTreeBa!(tree, ba_idx)
else
all_ba_pruned = false
end
all_ba_pruned && (tree.b_pruned[b_idx] = true)
end

all_ba_pruned && (tree.b_pruned[b_idx] = true)
end
end
end
Expand Down

0 comments on commit 7aeffdb

Please sign in to comment.