Skip to content

Restricting the number of solutions? #223

Description

@hakank

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 for option_with_attributes or maybe better: a new option n_solutions.

E.,g. something like:

model = Model(optimizer_with_attributes(CS.Optimizer,   
                                         # "all_solutions"=> 2,
                                         "n_solutions"=> 2,
                                         "logging"=>[],
                                         # ...
                                        ))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestoptionNew option of the solver

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions