Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Oct 30, 2024
1 parent 5f6f995 commit fe1fa97
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Utilities/copy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -386,16 +386,14 @@ function default_copy_to(dest::MOI.ModelLike, src::MOI.ModelLike)
for (F, S) in MOI.get(src, MOI.ListOfConstraintTypesPresent())
if F == MOI.VariableIndex
if !MOI.supports_add_constrained_variable(dest, S)
throw(MOI.AddConstraintNotAllowed{F,S}())
throw(MOI.UnsupportedConstraint{F,S}())
end
elseif F == MOI.VectorOfVariables
if !MOI.supports_add_constrained_variables(dest, S)
throw(MOI.AddConstraintNotAllowed{F,S}())
end
else
if !MOI.supports_constraint(dest, F, S)
throw(MOI.AddConstraintNotAllowed{F,S}())
throw(MOI.UnsupportedConstraint{F,S}())

Check warning on line 393 in src/Utilities/copy.jl

View check run for this annotation

Codecov / codecov/patch

src/Utilities/copy.jl#L392-L393

Added lines #L392 - L393 were not covered by tests
end
elseif !MOI.supports_constraint(dest, F, S)
throw(MOI.UnsupportedConstraint{F,S}())
end
end
index_map, vis_src, constraints_not_added =
Expand Down

0 comments on commit fe1fa97

Please sign in to comment.