Generate unique elements in an array

In reply to edaboy:

Are you sure you are not getting any other warnings or error messages before the displayed output. The tool you are using has lots of problems. Consider a different tool or upgrading to a more recent version.

The first constraint should be an error because it would try to create the constraint num[10] !=num[9], and num[10[ is out of bounds. You need to write it as

  constraint rand_num{foreach (num[i]) i+1 < $size(num) -> num[I+1] != num[i];};

The other two constraints work for me.