From 6e539026928f8c883c0b292c9a529738c34d2e91 Mon Sep 17 00:00:00 2001 From: odow Date: Thu, 6 Apr 2023 12:46:48 +1200 Subject: [PATCH 1/3] Add test for order of start values --- Project.toml | 2 +- docs/Project.toml | 2 +- test/test_model.jl | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 7413e99d998..06bf3d0c190 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,7 @@ SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] -MathOptInterface = "1.13" +MathOptInterface = "1.14" MutableArithmetics = "1" OrderedCollections = "1" SnoopPrecompile = "1" diff --git a/docs/Project.toml b/docs/Project.toml index b4320c040ca..3631d6fe115 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -34,7 +34,7 @@ Ipopt = "=1.2.0" JSON = "0.21" JSONSchema = "1" Literate = "2.8" -MathOptInterface = "=1.13.2" +MathOptInterface = "=1.14.0" MultiObjectiveAlgorithms = "=0.1.5" Plots = "1" SCS = "=1.1.3" diff --git a/test/test_model.jl b/test/test_model.jl index e7f6fee5a0b..dc140da0e7b 100644 --- a/test/test_model.jl +++ b/test/test_model.jl @@ -1057,6 +1057,26 @@ function test_set_start_values() return end +function test_model_quad_to_soc_start_values() + inner = MOI.Utilities.MockOptimizer( + MOI.Bridges.Constraint.QuadtoSOC{Float64}( + MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()), + ) + ) + model = direct_model(inner) + @variable(model, x) + @constraint(model, c, x^2 <= 0) + @test_throws ErrorException set_start_value(c, 0.0) + set_start_values( + model; + variable_primal_start = x -> 1.0, + constraint_primal_start = x -> 1.0, + constraint_dual_start = x -> 1.0, + ) + @test start_value(c) == 1.0 + return +end + function test_keyword_getindex() err = JuMP._get_index_keyword_indexing_error() model = Model() From bc6ddefd0d1a536647727bff1871967a0a249ff3 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 6 Apr 2023 12:54:34 +1200 Subject: [PATCH 2/3] Update test/test_model.jl --- test/test_model.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_model.jl b/test/test_model.jl index dc140da0e7b..76cd056317f 100644 --- a/test/test_model.jl +++ b/test/test_model.jl @@ -1061,7 +1061,7 @@ function test_model_quad_to_soc_start_values() inner = MOI.Utilities.MockOptimizer( MOI.Bridges.Constraint.QuadtoSOC{Float64}( MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()), - ) + ), ) model = direct_model(inner) @variable(model, x) From 829b0e98b7bdd84f40f0f358d86247027411be43 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 7 Apr 2023 11:45:29 +1200 Subject: [PATCH 3/3] Update docs/Project.toml --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index 3631d6fe115..1b5947911fc 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -34,7 +34,7 @@ Ipopt = "=1.2.0" JSON = "0.21" JSONSchema = "1" Literate = "2.8" -MathOptInterface = "=1.14.0" +MathOptInterface = "=1.14.1" MultiObjectiveAlgorithms = "=0.1.5" Plots = "1" SCS = "=1.1.3"