File tree 4 files changed +18
-2
lines changed
4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
13
13
SparseArrays = " 2f01184e-e22b-5df5-ae63-d93ebab69eaf"
14
14
15
15
[compat ]
16
- MathOptInterface = " 1.17 "
16
+ MathOptInterface = " 1.18 "
17
17
MutableArithmetics = " 1"
18
18
OrderedCollections = " 1"
19
19
SnoopPrecompile = " 1"
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Ipopt = "=1.4.1"
42
42
JSON = " 0.21"
43
43
JSONSchema = " 1"
44
44
Literate = " 2.8"
45
- MathOptInterface = " =1.17.1 "
45
+ MathOptInterface = " =1.18.0 "
46
46
MultiObjectiveAlgorithms = " =1.0.0"
47
47
Plots = " 1"
48
48
SCS = " =1.2.0"
Original file line number Diff line number Diff line change @@ -1151,6 +1151,8 @@ function set_start_values(
1151
1151
for (ci, dual_start) in constraint_dual
1152
1152
set_dual_start_value (ci, dual_start)
1153
1153
end
1154
+ # Needed for models which bridge `min f(x)` into `min t; t >= f(x)`.
1155
+ MOI. set (model, MOI. Bridges. Objective. SlackBridgePrimalDualStart (), nothing )
1154
1156
return
1155
1157
end
1156
1158
Original file line number Diff line number Diff line change @@ -1110,6 +1110,20 @@ function test_model_quad_to_soc_start_values()
1110
1110
return
1111
1111
end
1112
1112
1113
+ function test_SlackBridgePrimalDualStart ()
1114
+ inner = MOI. Utilities. UniversalFallback (MOI. Utilities. Model {Float64} ())
1115
+ mock = MOI. Utilities. MockOptimizer (inner)
1116
+ model = direct_model (MOI. Bridges. Objective. Slack {Float64} (mock))
1117
+ @variable (model, x, start = 1.0 )
1118
+ @objective (model, Min, x^ 2 )
1119
+ set_start_values (model; variable_primal_start = start_value)
1120
+ F, S = MOI. ScalarQuadraticFunction{Float64}, MOI. LessThan{Float64}
1121
+ ci = first (MOI. get (inner, MOI. ListOfConstraintIndices {F,S} ()))
1122
+ @test MOI. get (inner, MOI. ConstraintPrimalStart (), ci) == 0.0
1123
+ @test MOI. get (inner, MOI. ConstraintDualStart (), ci) == - 1.0
1124
+ return
1125
+ end
1126
+
1113
1127
function test_keyword_getindex ()
1114
1128
err = JuMP. _get_index_keyword_indexing_error ()
1115
1129
model = Model ()
You can’t perform that action at this time.
0 commit comments