Skip to content

Commit

Permalink
Minor change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrych committed Oct 31, 2023
1 parent e576798 commit f3af945
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions test/LMO_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ diffi = Random.rand(Bool, n) * 0.6 .+ 0.3
branching_strategy = Boscia.PartialStrongBranching(10, 1e-3, blmo)

x, _, result =
Boscia.solve(f, grad!, blmo, verbose=true, branching_strategy=branching_strategy)
Boscia.solve(f, grad!, blmo, branching_strategy=branching_strategy)

@test x == round.(diffi)
@test isapprox(f(x), f(result[:raw_solution]), atol=1e-6, rtol=1e-3)
Expand All @@ -95,10 +95,8 @@ diffi = Random.rand(Bool, n) * 0.6 .+ 0.3
end
branching_strategy = Boscia.HybridStrongBranching(10, 1e-3, blmo, perform_strong_branch)

branching_strategy = Boscia.PartialStrongBranching(10, 1e-3, blmo, branching_strategy=branching_strategy)

x, _, result =
Boscia.solve(f, grad!, blmo, verbose=true)
Boscia.solve(f, grad!, blmo, branching_strategy=branching_strategy)

@test x == round.(diffi)
@test isapprox(f(x), f(result[:raw_solution]), atol=1e-6, rtol=1e-3)
Expand Down
4 changes: 2 additions & 2 deletions test/interface_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ end
sblmo = Boscia.CubeSimpleBLMO(lbs, ubs, int_vars)

x, _, result =
Boscia.solve(f, grad!, sblmo, lbs[int_vars], ubs[int_vars], int_vars, n, verbose=true)
Boscia.solve(f, grad!, sblmo, lbs[int_vars], ubs[int_vars], int_vars, n)

@test x == round.(diffi)
@test isapprox(f(x), f(result[:raw_solution]), atol=1e-6, rtol=1e-3)
Expand All @@ -110,7 +110,7 @@ end
sblmo = Boscia.CubeSimpleBLMO(lbs, ubs, int_vars)

x, _, result =
Boscia.solve(f, grad!, sblmo, lbs[int_vars], ubs[int_vars], int_vars, n, verbose=true, use_shadow_set=false)
Boscia.solve(f, grad!, sblmo, lbs[int_vars], ubs[int_vars], int_vars, n, use_shadow_set=false)

@test x == round.(diffi)
@test isapprox(f(x), f(result[:raw_solution]), atol=1e-6, rtol=1e-3)
Expand Down

0 comments on commit f3af945

Please sign in to comment.