Skip to content

Commit

Permalink
fix #242
Browse files Browse the repository at this point in the history
  • Loading branch information
guimarqu committed Jan 27, 2020
1 parent 15484a4 commit cd16ea5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Algorithm/branching/branchinggroup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ function compute_tree_depth_score!(group::BranchingGroup, parent_inc::Incumbents
elseif length(deltas) == 1
score = - parent_delta / deltas[1]
else
score = - log(number_of_leaves(parent_delta, deltas)) / log(length(deltas))
numleaves = number_of_leaves(parent_delta, deltas)
if numleaves < 0
score = - Inf
else
score = - log(numleaves) / log(length(deltas))
end
end

group.score = score
Expand Down

0 comments on commit cd16ea5

Please sign in to comment.