Skip to content

Commit

Permalink
Remove duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jul 22, 2019
1 parent 186fd60 commit 20a0265
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@ implemented if `model` does not support free variables. For instance, if a
solver requires all variables to be nonnegative, it should implement this
method and return `false` because free variables cannot be copied to the solver.
Note that free variables are not explicitly set to be free by calling
[`add_constraint`](@ref) with the set [`Reals`](@ref), instead, free variables
are created with [`add_variable`](@ref) and [`add_variables`](@ref).
If `model` does not support free variables, it should not implement
[`add_variable`](@ref) nor [`add_variables`](@ref) but should implement
this method and return `false`. This allows free variables to be bridged as the
sum of a nonnegative and a nonpositive variables.
""" # Implemented as only one method to avoid ambiguity
function supports_constraint(model::ModelLike, F::Type{<:AbstractFunction},
S::Type{<:AbstractSet})
return F == VectorOfVariables && S == Reals
end

supports_constraint(model::ModelLike, ::Type{VectorOfVariables}, ::Type{Reals})::Bool

Return a `Bool` indicating whether `model` supports free variables.
By default, this method returns `true` so it should only be implemented if
`model` does not support free variables.

Note that free variables are not explicitly set to be free by calling
[`add_constraint`](@ref) with the set [`Reals`](@ref), instead, free variables
are created with [`add_variable`](@ref) and [`add_variables`](@ref).
Expand Down

0 comments on commit 20a0265

Please sign in to comment.