You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
haskey(model.vector_quadratic_outer_to_inner, c) ||
820
+
haskey(model.affine_outer_to_inner, c)
811
821
error(
812
822
"Parametric constraint cannot be modified in ParametricOptInterface, because it would conflict with parameter updates. You can update the parameters instead.",
813
823
)
@@ -1032,8 +1042,6 @@ function MOI.add_constraint(
"MOI.ListOfConstraintAttributesSet is not implemented for ScalarQuadraticFunction in ParametricOptInterface.",
1372
-
)
1373
-
elseif F <:MOI.VectorQuadraticFunction
1374
-
error(
1375
-
"MOI.ListOfConstraintAttributesSet is not implemented for VectorQuadraticFunction in ParametricOptInterface.",
1376
-
)
1376
+
) where {T,F<:MOI.ScalarQuadraticFunction{T},S}
1377
+
if MOI.supports_constraint(model.optimizer, F, S)
1378
+
# in this case we cant tell if the constraint will be quadratic or
1379
+
# lowered to affine
1380
+
if model.warn_quad_affine_ambiguous
1381
+
println(
1382
+
"MOI.ListOfConstraintAttributesSet is not supported for ScalarQuadraticFunction in ParametricOptInterface, an empty list will be returned. This message can be suppressed by setting `POI._WarnIfQuadraticOfAffineFunctionAmbiguous` to false.",
# in this case we cant tell if the constraint will be quadratic or
1399
+
# lowered to affine
1400
+
if model.warn_quad_affine_ambiguous
1401
+
println(
1402
+
"MOI.ListOfConstraintAttributesSet is not supported for VectorQuadraticFunction in ParametricOptInterface, an empty list will be returned. This message can be suppressed by setting `POI._WarnIfQuadraticOfAffineFunctionAmbiguous` to false.",
0 commit comments