{"action":"created","issue":{"url":"https://api.github.com/repos/eomahony/Numberjack/issues/42","repository_url":"https://api.github.com/repos/eomahony/Numberjack","labels_url":"https://api.github.com/repos/eomahony/Numberjack/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/eomahony/Numberjack/issues/42/comments","events_url":"https://api.github.com/repos/eomahony/Numberjack/issues/42/events","html_url":"https://github.com/eomahony/Numberjack/issues/42","id":156565277,"number":42,"title":"Issues with .Mul operator for constraints.","user":{"login":"jbum","id":287977,"avatar_url":"https://avatars.githubusercontent.com/u/287977?v=3","gravatar_id":"","url":"https://api.github.com/users/jbum","html_url":"https://github.com/jbum","followers_url":"https://api.github.com/users/jbum/followers","following_url":"https://api.github.com/users/jbum/following{/other_user}","gists_url":"https://api.github.com/users/jbum/gists{/gist_id}","starred_url":"https://api.github.com/users/jbum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbum/subscriptions","organizations_url":"https://api.github.com/users/jbum/orgs","repos_url":"https://api.github.com/users/jbum/repos","events_url":"https://api.github.com/users/jbum/events{/privacy}","received_events_url":"https://api.github.com/users/jbum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-05-24T17:32:28Z","updated_at":"2016-05-27T17:09:06Z","closed_at":null,"body":"Here is sample code for a KenKen solver that I'm working on.\r\n\r\nhttps://gist.github.com/jbum/796dc1c808475eae7f7f9b01fa8d0537\r\n\r\nMore info about this puzzle: https://en.wikipedia.org/wiki/KenKen\r\n\r\nTwo issues.\r\n\r\n1) Ideally, I'd like to see a Product() method which is the analogue to the Sum() method, (or a lambda comprehension)  This would be useful for setting up clues in KenKens that involve multiplication.  Since this doesn't exist, I'm doing explicit multiplications, based on the number of cells in the cage:\r\n\r\n```\r\n      ls = len(cage)\r\n      if ls == 2:\r\n        model += (cage[0] * cage[1]) == res\r\n      elif ls == 3:\r\n        model += (cage[0] * cage[1] * cage[2]) == res\r\n      elif ls == 4:\r\n        model += (cage[0] * cage[1] * cage[2] * cage[3]) == res\r\n     # etc...\r\n```\r\n\r\nHowever this is not working as expected.  When the code is included, the solver fails to solve the puzzle.  When the code for the multiply operator is omitted, the solver finds multiple solutions (as I would expect), which leads me to believe it is only the multiply operator that is causing problems.\r\n\r\nThis is all with Mistral.  When I use MiniSat, I get multiple solutions.  These are known valid puzzles with a single solution. "},"comment":{"url":"https://api.github.com/repos/eomahony/Numberjack/issues/comments/222201494","html_url":"https://github.com/eomahony/Numberjack/issues/42#issuecomment-222201494","issue_url":"https://api.github.com/repos/eomahony/Numberjack/issues/42","id":222201494,"user":{"login":"jbum","id":287977,"avatar_url":"https://avatars.githubusercontent.com/u/287977?v=3","gravatar_id":"","url":"https://api.github.com/users/jbum","html_url":"https://github.com/jbum","followers_url":"https://api.github.com/users/jbum/followers","following_url":"https://api.github.com/users/jbum/following{/other_user}","gists_url":"https://api.github.com/users/jbum/gists{/gist_id}","starred_url":"https://api.github.com/users/jbum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbum/subscriptions","organizations_url":"https://api.github.com/users/jbum/orgs","repos_url":"https://api.github.com/users/jbum/repos","events_url":"https://api.github.com/users/jbum/events{/privacy}","received_events_url":"https://api.github.com/users/jbum/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T17:09:06Z","updated_at":"2016-05-27T17:09:06Z","body":"[testInkies.zip](https://github.com/eomahony/Numberjack/files/287015/testInkies.zip)\r\n\r\nI'm having some issues with puzzles not solving when I run through large test suite, but when I isolate the puzzles, they solve okay.  The attached archive contains a number of large test suites of valid KenKen (Inky) puzzles, and a solver for them.\r\n\r\n$ python testInkies_nj.py inkies_6KX.txt -s Mistral2\r\nThere are 4 puzzles that fail to solve for me.  If I paste them into the KenKen solver, which is essentially the same but has embedded puzzles, they solve.\r\n\r\n$ python testInkies_nj.py inkies_6E.txt -s Mistral2\r\nThis one produces the constraint problem from above (on a Mac).\r\n\r\n\r\n"}}
{"actor":{"display_login":"jbum"}}