Skip to content

Commit

Permalink
CompatHelper: bump compat for SCIP in [weakdeps] to 0.12, (keep exist…
Browse files Browse the repository at this point in the history
…ing compat) (#205)
  • Loading branch information
github-actions[bot] authored Nov 13, 2024
1 parent 632ca6c commit 16d594f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ MathOptInterface = "1"
MathOptSetDistances = "0.2"
Printf = "1.6"
Random = "1.6"
SCIP = "0.11"
SCIP = "0.11, 0.12"
Statistics = "1.6"
julia = "1.6"

[extras]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
SCIP = "82193955-e24f-5292-bf16-6f2c5261a85f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"

[targets]
test = ["Test", "HiGHS", "Distributions", "SCIP", "DoubleFloats"]
2 changes: 1 addition & 1 deletion examples/birkhoff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ x, _, _ = Boscia.solve(f, grad!, lmo, verbose=true)
MOI.set(branching_strategy.bounded_lmo.o, MOI.Silent(), true)
x_strong, _, result_strong =
Boscia.solve(f, grad!, lmo, verbose=true, branching_strategy=branching_strategy)
@test f(x) f(x_strong)
@test isapprox(f(x), f(x_strong), atol=1e-5, rtol=1e-2)
@test f(x) <= f(result_strong[:raw_solution]) + 1e-6
end
5 changes: 3 additions & 2 deletions examples/strong_branching_portfolio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using Distributions
import MathOptInterface
const MOI = MathOptInterface
import HiGHS
using SCIP


# For bug hunting:
Expand All @@ -27,7 +28,7 @@ const Mi = (Ai + Ai') / 2
@assert isposdef(Mi)

function prepare_portfolio_lmo()
o = HiGHS.Optimizer()
o = SCIP.Optimizer()
MOI.set(o, MOI.Silent(), true)
MOI.empty!(o)
x = MOI.add_variables(o, n)
Expand Down Expand Up @@ -75,7 +76,7 @@ end
x, _, result_strong_branching =
Boscia.solve(f, grad!, lmo, verbose=true, branching_strategy=branching_strategy)

@test dot(ai, x) <= bi + 1e-6
@test dot(ai, x) <= bi + 1e-3
@test f(x) <= f(result_baseline[:raw_solution]) + 1e-6
end

Expand Down
7 changes: 5 additions & 2 deletions test/strong_convexity_and_sharpness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ using FrankWolfe
# Strong convexity: μ = minimum(eigvals(Q))
# Sharpness: M = sqrt(2/μ), θ = 1/2


seed = 0x5526f8e0e9a68f36
Random.seed!(seed)

@testset "Strong convexity" begin

@testset "Log barrier" begin
Expand Down Expand Up @@ -105,10 +109,10 @@ using FrankWolfe
n,
strong_convexity=μ,
verbose=true,
fw_epsilon=1e-3,
)

@test isapprox(f(x), f(sol), atol=1e-5, rtol=1e-2)
@test sum(x .== sol) == n
end
end

Expand Down Expand Up @@ -208,6 +212,5 @@ end
)

@test isapprox(f(x), f(sol), atol=1e-5, rtol=1e-2)
@test sum( x .== sol) == n
end
end

0 comments on commit 16d594f

Please sign in to comment.