Skip to content

Commit

Permalink
bring back SDPA also on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Mar 9, 2024
1 parent 8e4df41 commit 2ea11ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 38 deletions.
14 changes: 3 additions & 11 deletions test/multivariate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,9 @@ end
# Note: DynamicPolynomials automatically expands p, and evaluation using
# interval arithmetic gives a worse left bound than the factored expression.

if Sys.iswindows() # SDPA is broken on Windows
@test_broken begin
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
isapprox(inf(x), 0.0; atol=1e-3)
isapprox(sup(x), 670.612; atol=1e-3)
end
else
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
@test isapprox(inf(x), 0.0; atol=1e-3)
@test isapprox(sup(x), 670.612; atol=1e-3)
end
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
@test isapprox(inf(x), 0.0; atol=1e-3)
@test isapprox(sup(x), 670.612; atol=1e-3)
end

@testset "Taylor-model solver without normalization" begin
Expand Down
19 changes: 5 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using Test, RangeEnclosures
using AffineArithmetic, IntervalOptimisation, TaylorModels, SumOfSquares

@static if Sys.iswindows() # SDPA is broken on Windows
@test_broken using SDPA
else
using SDPA
end

using AffineArithmetic, IntervalOptimisation, TaylorModels, SDPA, SumOfSquares
using DynamicPolynomials: @polyvar

available_solvers = (NaturalEnclosure(),
Expand All @@ -20,12 +13,10 @@ include("univariate.jl")
include("multivariate.jl")
include("paper.jl")

@static if !Sys.iswindows() # SDPA is broken on Windows
using Documenter
include("../docs/init.jl")
@testset "doctests" begin
doctest(RangeEnclosures)
end
using Documenter
include("../docs/init.jl")
@testset "doctests" begin
doctest(RangeEnclosures)
end

include("Aqua.jl")
17 changes: 4 additions & 13 deletions test/univariate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,10 @@ end
rleft, rright = relative_precision(x, xref)
@test rleft 1e-5 && rright 1e-5

if Sys.iswindows() # SDPA is broken on Windows
@test_broken begin
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
xref = interval(4.8333, 10.541)
rleft, rright = relative_precision(x, xref)
rleft 1e-5 && rright 1e-5
end
else
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
xref = interval(4.8333, 10.541)
rleft, rright = relative_precision(x, xref)
@test rleft 1e-5 && rright 1e-5
end
x = enclose(p, dom, SumOfSquaresEnclosure(; backend=SDPA.Optimizer))
xref = interval(4.8333, 10.541)
rleft, rright = relative_precision(x, xref)
@test rleft 1e-5 && rright 1e-5
end

@testset "Taylor-model solver without normalization" begin
Expand Down

0 comments on commit 2ea11ba

Please sign in to comment.