-
Notifications
You must be signed in to change notification settings - Fork 25
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
Solution hinting fix, when giving N-D variables and values #408
Conversation
looks good to me, but I can't get ortools to actually give me a solution that is using the hints. Is that because the problem is just too easy? |
We actually have a very efficient |
Indeed, it is cleaner that way, I didn't notice we had a function for that. Changed it to use flatlist. |
Did some cleanup and added a tests,good to merge now for me. |
# Conflicts: # cpmpy/solvers/pysat.py
Connected to issue #407
Flattening the variables and values first, before moving to the for loop of adding the hints.
Covering cases that vars and values are NDVarArrays, ndarrays or anything that has a .flat attribute + cases that the user may give lists for hinting.