Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Limit the amount of solutions returned by GetSolutions() #61

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

Open
FraCappo87Sky opened this issue Jul 13, 2020 · 2 comments
Open

Limit the amount of solutions returned by GetSolutions() #61

FraCappo87Sky opened this issue Jul 13, 2020 · 2 comments

Comments

@FraCappo87Sky
Copy link

I am currently using python-constraint to generate specific budget allocations I can then feed into an optimisation engine. The constraints these allocations must obey are quite complex and python-constraint proves to be really useful in finding them.
I would need to generate just a limited amount of allocations, however the current implementation of GetSolutions() aims always at computing all of them. As a consequence sometimes it takes ages to get access to any useful result.
Wouldn't be possible to add an additional parameter in GetSolutions() to tune the number of solutions the solver has to produce? This would help in reducing the amount of time a user has to wait to get some result.

@oisincar
Copy link

I just had a similar problem and there's an undocumented function 'getSolutionIter' that might be useful! It returns an iterable, so you can pull as many solutions as you'd like.

@FraCappo87Sky
Copy link
Author

The issue is that getSolutionIter is not implemented for all the available solvers...

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

No branches or pull requests

2 participants