Skip to content

Commit

Permalink
Faster deletion of bounds in fix (#2521)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Mar 9, 2021
1 parent 54c8b58 commit 994d16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/variables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,10 @@ function _moi_fix(backend, variable::VariableRef, value::Number, force::Bool)
"delete existing bounds before fixing the variable.")
end
if _moi_has_upper_bound(backend, variable)
delete_upper_bound(variable)
MOI.delete(backend, _upper_bound_index(variable))
end
if _moi_has_lower_bound(backend, variable)
delete_lower_bound(variable)
MOI.delete(backend, _lower_bound_index(variable))
end
end
MOI.add_constraint(backend, MOI.SingleVariable(index(variable)),
Expand Down

0 comments on commit 994d16b

Please sign in to comment.