@@ -50,24 +50,14 @@ function _update_affine_constraints!(
5050 MOI. AbstractScalarSet,
5151 },
5252) where {F,S<: Union{MOI.LessThan,MOI.GreaterThan,MOI.EqualTo} ,V}
53- # cis = MOI.ConstraintIndex{F,S}[]
54- # sets = S[]
55- # sizehint!(cis, length(affine_constraint_cache_inner))
56- # sizehint!(sets, length(affine_constraint_cache_inner))
5753 for (inner_ci, pf) in affine_constraint_cache_inner
5854 delta_constant = _delta_parametric_constant (model, pf)
5955 if ! iszero (delta_constant)
6056 pf. current_constant += delta_constant
6157 new_set = S (pf. set_constant - pf. current_constant)
62- # new_set = _set_with_new_constant(set, param_constant)
6358 MOI. set (model. optimizer, MOI. ConstraintSet (), inner_ci, new_set)
64- # push!(cis, inner_ci)
65- # push!(sets, new_set)
6659 end
6760 end
68- # if !isempty(cis)
69- # MOI.set(model.optimizer, MOI.ConstraintSet(), cis, sets)
70- # end
7161 return
7262end
7363
@@ -192,19 +182,12 @@ function _update_quadratic_constraints!(
192182 MOI. AbstractScalarSet,
193183 },
194184) where {F,S<: Union{MOI.LessThan,MOI.GreaterThan,MOI.EqualTo} ,V}
195- # cis = MOI.ConstraintIndex{F,S}[]
196- # sets = S[]
197- # sizehint!(cis, length(quadratic_constraint_cache_inner))
198- # sizehint!(sets, length(quadratic_constraint_cache_inner))
199185 for (inner_ci, pf) in quadratic_constraint_cache_inner
200186 delta_constant = _delta_parametric_constant (model, pf)
201187 if ! iszero (delta_constant)
202188 pf. current_constant += delta_constant
203189 new_set = S (pf. set_constant - pf. current_constant)
204- # new_set = _set_with_new_constant(set, param_constant)
205190 MOI. set (model. optimizer, MOI. ConstraintSet (), inner_ci, new_set)
206- # push!(cis, inner_ci)
207- # push!(sets, new_set)
208191 end
209192 delta_terms = _delta_parametric_affine_terms (model, pf)
210193 if ! isempty (delta_terms)
@@ -213,9 +196,6 @@ function _update_quadratic_constraints!(
213196 MOI. modify (model. optimizer, cis, changes)
214197 end
215198 end
216- # if !isempty(cis)
217- # MOI.set(model.optimizer, MOI.ConstraintSet(), cis, sets)
218- # end
219199 return
220200end
221201
0 commit comments