Skip to content

Commit 9b69681

Browse files
authored
Enable working tests (#370)
* Enable working tests * measure -> moment_vector
1 parent 6334d4c commit 9b69681

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/src/tutorials/Other Applications/bounds_in_probability.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using DynamicPolynomials
2828
@polyvar x
2929
monos = [1, x, x^2]
3030
using SumOfSquares
31-
μ = measure([μ0, μ1, μ2], monos)
31+
μ = moment_vector([μ0, μ1, μ2], monos)
3232

3333
# We need to pick an SDP solver, see [here](https://jump.dev/JuMP.jl/v1.12/installation/#Supported-solvers) for a list of the available choices.
3434
# We use `SOSModel` instead of `Model` to be able to use the `>=` syntax for Sum-of-Squares constraints.

docs/src/tutorials/Polynomial Optimization/goldstein_price.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ solution_summary(model)
5555
# We can obtain the following list of these moments without duplicates
5656
# (ignoring when difference of entries representing the same moments is below `1e-5`)
5757

58-
μ = measure(ν, atol = 1e-5)
58+
μ = moment_vector(ν, atol = 1e-5)
5959

6060
# The truncated moment matrix can then be obtained as follows
6161

test/Mock/mock_tests.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ include("utilities.jl")
33

44
using Test, JuMP
55

6-
#@testset "Term" begin
7-
# include("term.jl")
8-
#end
6+
@testset "Term" begin
7+
include("term.jl")
8+
end
99
#@testset "Term fixed" begin
1010
# include("term_fixed.jl")
1111
#end
@@ -60,9 +60,9 @@ end
6060
@testset "SOSDEMO9" begin
6161
include("sosdemo9.jl")
6262
end
63-
#@testset "SOSDEMO10" begin
64-
# include("sosdemo10.jl")
65-
#end
66-
#@testset "Options Pricing" begin
67-
# include("options_pricing.jl")
68-
#end
63+
@testset "SOSDEMO10" begin
64+
include("sosdemo10.jl")
65+
end
66+
@testset "Options Pricing" begin
67+
include("options_pricing.jl")
68+
end

test/Tests/options_pricing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function options_pricing_test(
1919
@polyvar x y z
2020
σ = [184.04, 164.88, 164.88, 184.04, 164.88, 184.04]
2121
X = [x^2, x * y, x * z, y^2, y * z, z^2, x, y, z, 1]
22-
μ = measure([σ .+ 44.21^2; 44.21 * ones(3); 1], X)
22+
μ = moment_vector([σ .+ 44.21^2; 44.21 * ones(3); 1], X)
2323

2424
cocone = CopositiveInner(cone)
2525

0 commit comments

Comments
 (0)