@@ -1347,30 +1347,15 @@ function MOI.supports(
1347
1347
attr:: MOI.AbstractConstraintAttribute ,
1348
1348
IndexType:: Type{MOI.ConstraintIndex{F,S}} ,
1349
1349
) where {F,S}
1350
- is_variable_function = F == MOI. Utilities. variable_function_type (S)
1351
- # A `F`-in-`S` constraint could be added to the model either if it this
1352
- # constraint is not bridged or if variables constrained on creations to `S`
1353
- # are not bridged and `F` is `VariableIndex` or `VectorOfVariables`.
1354
- if ! is_bridged (b, F, S) || (is_variable_function && ! is_bridged (b, S))
1355
- if ! MOI. supports (b. model, attr, IndexType)
1356
- return false
1357
- end
1358
- end
1359
- bridge = recursive_model (b)
1360
- # If variable bridged, get the indices from the variable bridges.
1361
- if is_variable_function && is_bridged (b, S) && is_variable_bridged (b, S)
1362
- if ! MOI. supports (bridge, attr, Variable. concrete_bridge_type (b, S))
1363
- return false
1364
- end
1365
- end
1366
- # If constraint bridged, get the indices from the constraint bridges.
1367
- if is_bridged (b, F, S) ||
1368
- (is_variable_function && supports_constraint_bridges (b))
1369
- if ! MOI. supports (bridge, attr, Constraint. concrete_bridge_type (b, F, S))
1370
- return false
1371
- end
1350
+ if is_bridged (b, F, S)
1351
+ bridge = Constraint. concrete_bridge_type (b, F, S)
1352
+ return MOI. supports (recursive_model (b), attr, bridge)
1353
+ elseif F == MOI. Utilities. variable_function_type (S) && is_bridged (b, S)
1354
+ bridge = Variable. concrete_bridge_type (b, S)
1355
+ return MOI. supports (recursive_model (b), attr, bridge)
1356
+ else
1357
+ return MOI. supports (b. model, attr, IndexType)
1372
1358
end
1373
- return true
1374
1359
end
1375
1360
1376
1361
function MOI. set (
0 commit comments