Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug modifying a constraint after deletion #515

Merged
merged 4 commits into from
Aug 15, 2023
Merged

Conversation

odow
Copy link
Member

@odow odow commented Aug 15, 2023

Closes #514

The lazy update thing is really annoying. Most of the time it caches modifications in a queue, but it looks like deletions are handled separately to modifications.

@@ -3497,6 +3499,7 @@ function MOI.modify(
::MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}},
chg::MOI.ScalarCoefficientChange{Float64},
)
_update_if_necessary(model)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ones didn't seem to be necessary for the test, but I added just in case. I don't understand the internal details.

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (fbe5044) 90.86% compared to head (7934aa9) 90.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #515      +/-   ##
==========================================
+ Coverage   90.86%   90.87%   +0.01%     
==========================================
  Files           5        5              
  Lines        2418     2422       +4     
==========================================
+ Hits         2197     2201       +4     
  Misses        221      221              
Files Changed Coverage Δ
src/MOI_wrapper/MOI_wrapper.jl 89.96% <100.00%> (+0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow odow merged commit 38464c2 into master Aug 15, 2023
4 checks passed
@odow odow deleted the od/delete-modify branch August 15, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bug modifying coefficient after constraint deletion
1 participant