-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Restricting the number of solutions? #223
Comments
How about |
For my particular use case (Sudoku): I want the solver to yield at most 2 solutions. If I get only 1 solution then I'm happy, but if I actually get 2 solutions then my model is wrong, and I can then increment the number of solutions to debug the model. (The model can - of course - be wrong even if I get only one solution, but that's another thing. :-) ). But you have a point: Perhaps there is another use case ( |
I have some problems and maybe you ( @hakank ) can help me out 😉 If the uses the default it will compute one solution only, right? So I'm wondering what should happen for |
Here's my thoughts about this. On the first question, the main rule is that My intuition for the specific case you state is that I should also note that most FlatZinc (and other CP) solvers interprets the |
Currently I have One could also just drop |
You have a good point: Using only one flag ( This would mean that the |
For checking the unicity of a model (e.g. Sudoku) - or in general testing a model - it would be great if it it was possible to restrict the number of solutions to a certain number, here 2. Perhaps using the
all_solution
option foroption_with_attributes
or maybe better: a new optionn_solutions
.E.,g. something like:
The text was updated successfully, but these errors were encountered: