In reply to Shashank Gurijala:
I’d recommend you to try to print the variables you are using and understand the values and constraints to see what the issue could be for example try understand the data type of size_i,j and the result you get, also why are you declaring i,j,r,c, how are they intended to be used according to your logic?
Your code for the rand_size constraint doesn’t make sense to me (I could be wrong)
Since array is a dynamic array of arrays,IMHO it should be something like this:
array.size() == size_i; // sets the number of arrays
foreach(array[i]){
array[i].size() == size_j;// set the size of each array
}
Always check the return value of the randomize call i.e if(!pky.randomize())$fatal(…)
Finally there are several entries in this forum about this question/exercise.
HTH,
-R