Skip to content

Commit 660f13d

Browse files
authored
Merge pull request #791 from JuliaOpt/bl/copyunsupportedconstraint
CopyUnsupportedConstraint -> UnsupportedConstraint
2 parents 3879245 + f01d25c commit 660f13d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/constraints.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
"""
44
supports_constraint(model::ModelLike, ::Type{F}, ::Type{S})::Bool where {F<:AbstractFunction,S<:AbstractSet}
55
6-
Return a `Bool` indicating whether `model` supports `F`-in-`S` constraints, that is,
7-
`copy_to(model, src)` does not return `CopyUnsupportedConstraint` when `src` contains `F`-in-`S` constraints.
8-
If `F`-in-`S` constraints are only not supported in specific circumstances, e.g. `F`-in-`S` constraints cannot be combined with another type of constraint, it should still return `true`.
9-
"""
10-
supports_constraint(model::ModelLike, ::Type{<:AbstractFunction}, ::Type{<:AbstractSet}) = false
6+
Return a `Bool` indicating whether `model` supports `F`-in-`S` constraints, that
7+
is, `copy_to(model, src)` does not throw [`UnsupportedConstraint`](@ref) when
8+
`src` contains `F`-in-`S` constraints. If `F`-in-`S` constraints are only not
9+
supported in specific circumstances, e.g. `F`-in-`S` constraints cannot be
10+
combined with another type of constraint, it should still return `true`.
11+
"""
12+
function supports_constraint(model::ModelLike, F::Type{<:AbstractFunction},
13+
S::Type{<:AbstractSet})
14+
return false
15+
end
1116

1217
"""
1318
struct UnsupportedConstraint{F<:AbstractFunction, S<:AbstractSet} <: UnsupportedError

0 commit comments

Comments
 (0)