1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-27 02:45:30 +01:00

update IntervalArithmetic to 0.21

This commit is contained in:
Marek Kaluba 2024-02-15 22:44:23 +01:00
parent 27ce603872
commit c9f68eee8f
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
4 changed files with 21 additions and 10 deletions

View File

@ -20,14 +20,14 @@ SymbolicWedderburn = "858aa9a9-4c7c-4c62-b466-2421203962a2"
[compat] [compat]
COSMO = "0.8" COSMO = "0.8"
Groups = "0.8" Groups = "0.8"
IntervalArithmetic = "0.20"
IntervalMatrices = "0.8"
GroupsCore = "0.5" GroupsCore = "0.5"
IntervalArithmetic = "0.21"
IntervalMatrices = "0.10"
JuMP = ">=1.3" JuMP = ">=1.3"
PermutationGroups = "0.6.2" PermutationGroups = "0.6.2"
ProgressMeter = "1.7" ProgressMeter = "1.7"
SCS = "2" SCS = "2"
StarAlgebras = "0.2" StarAlgebras = "0.2.1"
StaticArrays = "1" StaticArrays = "1"
SymbolicWedderburn = "0.4" SymbolicWedderburn = "0.4"
julia = "1.6" julia = "1.6"

View File

@ -77,8 +77,10 @@ function sufficient_λ(residual::SA.AlgebraElement, λ; halfradius)
info_strs = [ info_strs = [
"Numerical metrics of the obtained SOS:", "Numerical metrics of the obtained SOS:",
"ɛ(elt - λu - ∑ξᵢ*ξᵢ) $eq_sign $(StarAlgebras.aug(residual))", "ɛ(elt - λu - ∑ξᵢ*ξᵢ) $eq_sign " *
"‖elt - λu - ∑ξᵢ*ξᵢ‖₁ $eq_sign $(L1_norm)", sprint(show, SA.aug(residual); context = :compact => true),
"‖elt - λu - ∑ξᵢ*ξᵢ‖₁ $eq_sign " *
sprint(show, L1_norm; context = :compact => true),
" λ $eq_sign $suff_λ", " λ $eq_sign $suff_λ",
] ]
@info join(info_strs, "\n") @info join(info_strs, "\n")
@ -121,9 +123,9 @@ function certify_solution(
return false, λ_flpoint return false, λ_flpoint
end end
λ_int = IntervalArithmetic.@interval(λ) λ_int = IntervalArithmetic.interval(Float64, λ)
Q_int = IntervalMatrices.IntervalMatrix([ 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 check, sos_int = @time if should_we_augment

View File

@ -173,7 +173,11 @@
) )
@test certified @test certified
@test isapprox(λ_cert, λ, rtol = 1e-5) @test isapprox(
PropertyT.IntervalArithmetic.inf(λ_cert),
λ,
rtol = 1e-5,
)
end end
@testset "augmented formulation" begin @testset "augmented formulation" begin
@ -213,7 +217,11 @@
) )
@test certified @test certified
@test isapprox(λ_cert, λ, rtol = 1e-5) @test isapprox(
PropertyT.IntervalArithmetic.inf(λ_cert),
λ,
rtol = 1e-5,
)
@test λ_cert > 2 // 10 @test λ_cert > 2 // 10
end end
end end

View File

@ -47,7 +47,8 @@
@test JuMP.termination_status(m) in @test JuMP.termination_status(m) in
(JuMP.ALMOST_OPTIMAL, JuMP.OPTIMAL) (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 end
@testset "Wedderburn decomposition" begin @testset "Wedderburn decomposition" begin