One parameter in my model controls the dimension of arrays; it can vary from 1 to any positive integer: for my purposes this can be up to 20.
The flow of the program goes through a number of loops that depend on this dimension.
For example, if the value of the parameter is one I would have:
for i1 in range(0,100,1):
do stuff
If the value of the parameter is two, then I would have something like:
for i1 in range (0,100,1):
for i2 in range (0,100,1):
do stuff
Or, if the value of the parameter is three I would have:
for i1 in range (0,100,1):
for i2 in range (0,100,1):
for i3 in range (0,100,1):
do stuff
The dimension can change, so it's not possible to specify in advance how many nested loops will be needed; this has to written in some parametric way.