Skip to content

Restricting the number of solutions? #223

@hakank

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"=>[],
                                         # ...
                                        ))

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