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 in removeAllValuesBut and removeValues and for enumerated domain variables #1011

Merged
merged 5 commits into from Feb 28, 2023

Conversation

cprudhom
Copy link
Member

I had this pernicious bug that occurs when the removeAllValuesBut method is called from for enumerated domain variables. This occurs when the variable is also monitored (here, a task) : the bounds was not up to date. Which led to inconcistency.
To fix the bug, I encapsulate the internal updateBounds call in a loop to make sure that side effects (monitors or views) are capture at the right time.
I also fix a bug in removeValues.

@cprudhom cprudhom added this to the 4.10.12 milestone Feb 17, 2023
@cprudhom cprudhom self-assigned this Feb 17, 2023
@cprudhom
Copy link
Member Author

Now that I look back to the code, I think there is a better alternative to while-loops.
I will suggest another correction soon

@mergify mergify bot dismissed ArthurGodet’s stale review February 27, 2023 12:46

Pull request has been modified.

@cprudhom
Copy link
Member Author

Now that I look back to the code, I think there is a better alternative to while-loops. I will suggest another correction soon

I finally let the code as is, I don't want the code to introduce to much code

Copy link
Collaborator

@ArthurGodet ArthurGodet left a comment

Choose a reason for hiding this comment

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

What the v and the c stand for in vlb/vub and clb/cub ?
Otherwise, seems fine to me !

@cprudhom
Copy link
Member Author

What the v and the c stand for in vlb/vub and clb/cub ? Otherwise, seems fine to me !

I am not very inspired: v stands for values, name of the parameter in the API, and c stands for current.

@ArthurGodet ArthurGodet self-requested a review February 27, 2023 15:21
ArthurGodet
ArthurGodet previously approved these changes Feb 27, 2023
@mergify mergify bot dismissed ArthurGodet’s stale review February 28, 2023 13:59

Pull request has been modified.

@cprudhom cprudhom merged commit 14c8007 into master Feb 28, 2023
@cprudhom cprudhom deleted the dev_bugremset branch February 28, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants