Skip to content

Commit

Permalink
Fix cut sharing in a graph with zero-probability arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Oct 23, 2024
1 parent 4091155 commit 6ca11ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/algorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ end
function get_same_children(model::PolicyGraph{T}) where {T}
tmp = Dict{Set{T},Set{T}}()
for (key, node) in model.nodes
children = Set(child.term for child in node.children)
children =
Set(child.term for child in node.children if child.probabillity > 0)
if length(children) == 0
continue
elseif haskey(tmp, children)
Expand Down

0 comments on commit 6ca11ac

Please sign in to comment.