-
Notifications
You must be signed in to change notification settings - Fork 10
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
Encode declared constraints and print on demand the violated ones #6
Comments
Good morning, Alex, and thank you for the question! If we want to add a constraint, we use e.g. Right now, the only way to check this is some sort of workarounds. In your example you could just check if I don't know if your case is more complicated. |
Hi Nikolaos, thanks for the answer. I'm trying to add new constraints based on the currently added.
But you can only do that after running My current workaround is just using another structure to save the current constraints. By the way, (totally unrelated) is there a way to get the constraints that are giving a conflict (when a solution is not found)? In my program I need to output why a solution was not found, so having the conflicting constraints could help. |
Buenos días, Alex! The check about the bounds of Regarding reporting the violated constraint, there's some significant work in the bibliography I'm not aware of. I guess that just printing the last inspected constraint (before a domain wipeout) isn't a complete solution. Anyway, I'll keep this issue open in case somebody wants to implement it. |
Thanks, Nikolaos. Great, I'll keep an eye on this issue. |
Is there a way to check if a particular constraint has been added to the problem manager before calling
nextSolution
?For example, check if the constraints
var == 1
has been added.The text was updated successfully, but these errors were encountered: