Skip to content

Commit

Permalink
Missed a few cases to force update
Browse files Browse the repository at this point in the history
  • Loading branch information
torressa committed Mar 14, 2024
1 parent 2cccf70 commit 4d204e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,7 @@ function MOI.delete(model::Optimizer, indices::Vector{<:MOI.VariableIndex})
# We throw away name_to_constraint_index so we will rebuild VariableIndex
# constraint names without v.
model.name_to_constraint_index = nothing
_require_update(model)
_update_if_necessary(model)
_update_if_necessary(model, force = true)
return
end

Expand All @@ -1035,8 +1034,7 @@ function MOI.delete(model::Optimizer, v::MOI.VariableIndex)
# We throw away name_to_constraint_index so we will rebuild VariableIndex
# constraint names without v.
model.name_to_constraint_index = nothing
_require_update(model)
_update_if_necessary(model)
_update_if_necessary(model, force = true)
return
end

Expand Down Expand Up @@ -4373,7 +4371,7 @@ function MOI.set(
_update_if_necessary(model)
ret = GRBsetstrattrelement(model, "QCName", Cint(info.row - 1), name)
_check_ret(model, ret)
# _require_update(model)
_require_update(model)
info.name = name
if model.name_to_constraint_index === nothing || isempty(name)
return
Expand Down

0 comments on commit 4d204e2

Please sign in to comment.