Question on Array.Sum() Method , generate a n*n matrix such that there is only one 1's in a coloumn

In reply to CPU_Verif:

just point out a typo

constraint array_col_sum {
foreach (array[,j]) {    // you probably want to traverse column since you require column max = 1
array.sum with (int'(array[item.index][j])) == 1; // col max sum is 1
}
}