chocoteam / choco-solver

An open-source Java library for Constraint Programming
http://choco-solver.org/
BSD 4-Clause "Original" or "Old" License
690 stars 143 forks source link

[BUG] fzn-choco, table, wrong answer #1045

Closed matsc-at-sics-se closed 1 year ago

matsc-at-sics-se commented 1 year ago

Choco 4.10.13.

Choco reports three solutions on this one: A=1, A=7, A=18. A=1 is wrong.

include "globals.mzn";
var {1,2,4,7,18}: A;
constraint table([A,A,], [| 1, 4, | 2, 1, | 4, 7, | 7, 2, | 7, 7, | 18, 18, |]);
solve :: int_search([A], largest, indomain_interval, complete) satisfy;
cprudhom commented 1 year ago

When multiple occurrences of variables are in the scope of table constraint, some algorithms does not work as expected. The solution is to replace such occurrences by views.

matsc-at-sics-se commented 1 year ago

I pulled and recompiled yesterday. The wrong solution is still there. Just letting you know.

cprudhom commented 1 year ago

Thank you, I had partly done the work.