Skip to content

Commit

Permalink
fix #110. BaB should delete the already-split domains from the queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
changliuliu committed Jul 12, 2020
1 parent 1a10023 commit a2fff4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/satisfiability/bab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function output_bound(solver::BaB, problem::Problem, type::Symbol)
doms = Tuple{Float64, Hyperrectangle}[(global_approx, problem.input)]
index = ifelse(type == :max, 1, -1)
while index * (global_approx - global_concrete) > solver.ϵ
dom = pick_out(doms) # pick_out implements the search strategy
dom, doms = pick_out(doms) # pick_out implements the search strategy
subdoms = split_dom(dom[2]) # split implements the branching rule
for i in 1:length(subdoms)
dom_concrete, x = concrete_bound(nnet, subdoms[i], type) # Sample
Expand All @@ -74,7 +74,7 @@ end

# Always pick the first dom
function pick_out(doms)
return doms[1]
return (doms[1], doms[2:end])
end

function add_domain!(doms::Vector{Tuple{Float64, Hyperrectangle}}, new::Tuple{Float64, Hyperrectangle}, type::Symbol)
Expand Down

0 comments on commit a2fff4c

Please sign in to comment.