diff --git a/Project.toml b/Project.toml index b6ebac0..dd078fe 100644 --- a/Project.toml +++ b/Project.toml @@ -20,14 +20,14 @@ SymbolicWedderburn = "858aa9a9-4c7c-4c62-b466-2421203962a2" [compat] COSMO = "0.8" Groups = "0.8" -IntervalArithmetic = "0.20" -IntervalMatrices = "0.8" GroupsCore = "0.5" +IntervalArithmetic = "0.21" +IntervalMatrices = "0.10" JuMP = ">=1.3" PermutationGroups = "0.6.2" ProgressMeter = "1.7" SCS = "2" -StarAlgebras = "0.2" +StarAlgebras = "0.2.1" StaticArrays = "1" SymbolicWedderburn = "0.4" julia = "1.6" diff --git a/src/certify.jl b/src/certify.jl index e39f056..35a3695 100644 --- a/src/certify.jl +++ b/src/certify.jl @@ -77,8 +77,10 @@ function sufficient_λ(residual::SA.AlgebraElement, λ; halfradius) info_strs = [ "Numerical metrics of the obtained SOS:", - "ɛ(elt - λu - ∑ξᵢ*ξᵢ) $eq_sign $(StarAlgebras.aug(residual))", - "‖elt - λu - ∑ξᵢ*ξᵢ‖₁ $eq_sign $(L1_norm)", + "ɛ(elt - λu - ∑ξᵢ*ξᵢ) $eq_sign " * + sprint(show, SA.aug(residual); context = :compact => true), + "‖elt - λu - ∑ξᵢ*ξᵢ‖₁ $eq_sign " * + sprint(show, L1_norm; context = :compact => true), " λ $eq_sign $suff_λ", ] @info join(info_strs, "\n") @@ -121,9 +123,9 @@ function certify_solution( return false, λ_flpoint end - λ_int = IntervalArithmetic.@interval(λ) + λ_int = IntervalArithmetic.interval(Float64, λ) Q_int = IntervalMatrices.IntervalMatrix([ - IntervalArithmetic.@interval(q) for q in Q + IntervalArithmetic.interval(Float64, q) for q in Q ]) check, sos_int = @time if should_we_augment diff --git a/test/1703.09680.jl b/test/1703.09680.jl index c901c8f..61175eb 100644 --- a/test/1703.09680.jl +++ b/test/1703.09680.jl @@ -173,7 +173,11 @@ ) @test certified - @test isapprox(λ_cert, λ, rtol = 1e-5) + @test isapprox( + PropertyT.IntervalArithmetic.inf(λ_cert), + λ, + rtol = 1e-5, + ) end @testset "augmented formulation" begin @@ -213,7 +217,11 @@ ) @test certified - @test isapprox(λ_cert, λ, rtol = 1e-5) + @test isapprox( + PropertyT.IntervalArithmetic.inf(λ_cert), + λ, + rtol = 1e-5, + ) @test λ_cert > 2 // 10 end end diff --git a/test/quick_tests.jl b/test/quick_tests.jl index 908b9c6..a9b4c49 100644 --- a/test/quick_tests.jl +++ b/test/quick_tests.jl @@ -47,7 +47,8 @@ @test JuMP.termination_status(m) in (JuMP.ALMOST_OPTIMAL, JuMP.OPTIMAL) - @test JuMP.objective_value(m) ≈ λ_cert atol = 1e-2 + @test JuMP.objective_value(m) ≈ + PropertyT.IntervalArithmetic.mid(λ_cert) atol = 1e-2 end @testset "Wedderburn decomposition" begin