Skip to content

Commit

Permalink
Fix update expression bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Aug 28, 2024
1 parent 91f27cf commit 25153eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/variables/variable_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ function _update_bound_constraint(existing_constraint, expr, ::typeof(==), bound
set_normalized_rhs(existing_constraint, 0)
else
for (var, coeff) in expr.terms
set_normalized_coefficient(existing_constraint, var, coeff)
set_normalized_coefficient(existing_constraint, var, realize(coeff))
end
set_normalized_rhs(existing_constraint, bound - expr.constant)
set_normalized_rhs(existing_constraint, bound - realize(expr.constant))
end
end
function _update_bound_constraint(existing_constraint, expr, _sense, bound)
if isfinite(bound)
set_normalized_rhs(existing_constraint, bound - expr.constant)
set_normalized_rhs(existing_constraint, bound - realize(expr.constant))
end
end

Expand Down

0 comments on commit 25153eb

Please sign in to comment.