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, nvalue, wrong solution #1042

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

matsc-at-sics-se commented 1 year ago

Choco 4.10.13.

This model has one solution, C = 2, D = 3, but Choco also finds C = D = 3, which is wrong.

include "globals.mzn";
var 2..3: C;
var 3..4: D;
constraint nvalue(D,[1,D,C,1]);
solve :: int_search([C,D], input_order, indomain_min, complete) satisfy;