Skip to content

Commit 4c83ce7

Browse files
authored
Merge pull request #133 from JuliaOpt/bl/sdpt3
Add SDPT3
2 parents b5bcb7b + 668ca7c commit 4c83ce7

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

test/Solvers/Manifest.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
243243

244244
[[PolyJuMP]]
245245
deps = ["JuMP", "LinearAlgebra", "MathOptInterface", "MultivariateMoments", "MultivariatePolynomials", "SemialgebraicSets"]
246-
git-tree-sha1 = "481e3278c66511ef7e384e0dabde379966091a71"
246+
git-tree-sha1 = "e25628d44af34666f669c80de458036b1cb3cf05"
247247
uuid = "ddf597a6-d67e-5340-b84c-e37d84115374"
248-
version = "0.3.3"
248+
version = "0.3.4"
249249

250250
[[Printf]]
251251
deps = ["Unicode"]
@@ -301,6 +301,12 @@ git-tree-sha1 = "6787480c2fc87c48f2c7d81a8a995244d084602a"
301301
uuid = "bfe18334-aefd-11e9-1109-4bf2b15a5b91"
302302
version = "0.1.1"
303303

304+
[[SDPT3]]
305+
deps = ["LinearAlgebra", "MATLAB", "MathOptInterface", "SparseArrays"]
306+
git-tree-sha1 = "2c410fe322a3175bb293539d0cb8bb7f6df0c0a7"
307+
uuid = "e33b2407-87ff-50a0-8b27-f0fe7855237d"
308+
version = "0.0.2"
309+
304310
[[SHA]]
305311
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
306312

test/Solvers/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ProxSDP = "65e78d25-6039-50a4-9445-38022e3d2eb3"
1111
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"
1212
SDPA = "b9a10b5b-afa4-512f-a053-bb3d8080febc"
1313
SDPAFamily = "bfe18334-aefd-11e9-1109-4bf2b15a5b91"
14+
SDPT3 = "e33b2407-87ff-50a0-8b27-f0fe7855237d"
1415
SeDuMi = "a895aaad-f784-5544-9392-bb281339c1b2"
1516
SemialgebraicSets = "8e049039-38e8-557d-ae3a-bc521ccf6204"
1617
SumOfSquares = "4b9e565b-77fc-50a5-a571-1244f986bda1"

test/Solvers/sdpt3_tests.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
include("solver_preamble.jl")
2+
import SDPT3
3+
factory = with_optimizer(SDPT3.Optimizer, printlevel = 0)
4+
config = MOI.Test.TestConfig(atol=1e-4, rtol=1e-4)
5+
@testset "Linear" begin
6+
Tests.linear_test(factory, config)
7+
end
8+
@testset "SOC" begin
9+
Tests.soc_test(factory, config, String[
10+
# Expression: termination_status(model) == MOI.OPTIMAL
11+
# Evaluated: MathOptInterface.SLOW_PROGRESS == MathOptInterface.OPTIMAL
12+
# Expression: primal_status(model) == MOI.FEASIBLE_POINT
13+
# Evaluated: MathOptInterface.NO_SOLUTION == MathOptInterface.FEASIBLE_POINT
14+
# Expression: ≈(value(p), x ^ 3, atol=atol, rtol=rtol)
15+
# Evaluated: 1.0173770753701414x³ + 1.5745867283645243e-11x² - 5.33707366495717e-12x + 7.1247443708677416e-12 ≈ x³ (atol=0.0001, rtol=0.0001)
16+
"sdsos_concave_then_convex_cubic"
17+
])
18+
end
19+
@testset "SDP" begin
20+
Tests.sd_test(factory, config, String[
21+
# Expression: JuMP.termination_status(model) == MOI.OPTIMAL
22+
# Evaluated: MathOptInterface.OTHER_ERROR == MathOptInterface.OPTIMAL
23+
# Expression: JuMP.primal_status(model) == MOI.FEASIBLE_POINT
24+
# Evaluated: MathOptInterface.NO_SOLUTION == MathOptInterface.FEASIBLE_POINT
25+
"chebyshev"
26+
])
27+
end

0 commit comments

Comments
 (0)