From d6aeadd3d5177061af4609d8511eef738a36228f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Mon, 25 Sep 2023 21:57:49 +0200 Subject: [PATCH] Switch back to CSDP --- docs/src/tutorials/Symmetry/dihedral.jl | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/src/tutorials/Symmetry/dihedral.jl b/docs/src/tutorials/Symmetry/dihedral.jl index a527a2db6..89306a845 100644 --- a/docs/src/tutorials/Symmetry/dihedral.jl +++ b/docs/src/tutorials/Symmetry/dihedral.jl @@ -134,16 +134,16 @@ end # We can exploit this symmetry for reducing the problem using the `SymmetricIdeal` certificate as follows: -import Clarabel +import CSDP function solve(G) - solver = Clarabel.Optimizer + solver = CSDP.Optimizer model = Model(solver) @variable(model, t) @objective(model, Max, t) pattern = Symmetry.Pattern(G, DihedralAction()) con_ref = @constraint(model, poly - t in SOSCone(), symmetry = pattern) optimize!(model) - @test value(t) ≈ -3825/4096 rtol=1e-2 #src + @test value(t) ≈ -3825/4096 rtol=5e-2 #src @show value(t) @@ -155,27 +155,27 @@ function solve(G) I = 3:-1:1 #src Q = g[i].Q[I, I] #src @test size(Q) == (3, 3) #src - @test Q[2, 2] ≈ 1 rtol=1e-2 #src - @test Q[1, 2] ≈ -5/8 rtol=1e-2 #src - @test Q[2, 3] ≈ -1 rtol=1e-2 #src - @test Q[1, 1] ≈ 25/64 rtol=1e-2 #src - @test Q[1, 3] ≈ 5/8 rtol=1e-2 #src - @test Q[3, 3] ≈ 1 rtol=1e-2 #src + @test Q[2, 2] ≈ 1 rtol=5e-2 #src + @test Q[1, 2] ≈ -5/8 rtol=5e-2 #src + @test Q[2, 3] ≈ -1 rtol=5e-2 #src + @test Q[1, 1] ≈ 25/64 rtol=5e-2 #src + @test Q[1, 3] ≈ 5/8 rtol=5e-2 #src + @test Q[3, 3] ≈ 1 rtol=5e-2 #src end #src @test length(g[3].basis.polynomials) == 2 #src @test g[3].basis.polynomials[1] == 1.0 #src @test g[3].basis.polynomials[2] ≈ -(√2/2)x^2 - (√2/2)y^2 #src @test size(g[3].Q) == (2, 2) #src - @test g[3].Q[1, 1] ≈ 7921/4096 rtol=1e-2 #src - @test g[3].Q[1, 2] ≈ 0.983 rtol=1e-2 #src - @test g[3].Q[2, 2] ≈ 1/2 rtol=1e-2 #src + @test g[3].Q[1, 1] ≈ 7921/4096 rtol=5e-2 #src + @test g[3].Q[1, 2] ≈ 0.983 rtol=5e-2 #src + @test g[3].Q[2, 2] ≈ 1/2 rtol=5e-2 #src @test g[4].basis.polynomials == [x * y] #src @test size(g[4].Q) == (1, 1) #src - @test g[4].Q[1, 1] ≈ 0 atol=1e-2 #src + @test g[4].Q[1, 1] ≈ 0 atol=5e-2 #src @test length(g[5].basis.polynomials) == 1 #src @test g[5].basis.polynomials[1] ≈ (√2/2)x^2 - (√2/2)y^2 #src @test size(g[5].Q) == (1, 1) #src - @test g[5].Q[1, 1] ≈ 0 atol=1e-2 #src + @test g[5].Q[1, 1] ≈ 0 atol=5e-2 #src for g in gram_matrix(con_ref).blocks println(g.basis.polynomials) end