In reply to sa5691:
Hey sa5691, sorry for not being clear on my requirement.
I need each element’s value to be less than 80 and sum of row to be 100.
I can do this seperatly and get correct result. But I want to specify this using sum method of array.
constraint array_c {
foreach (array1[i]) { // for each row
foreach (array1[,j]) { // for each column in 1 row // meaning element
array1[i][j] < 80; // value of that element less than 80
}
array1[i].sum(item) with (int'(item)) == 100; // each row total is 100
}
}