Question

I need to define a param which is an array of 14 arrays of various sizes: something like this" N{i}=[[3,4,2],[4,3,2,2],[3,2],...,[13,9,4]]

so that for example in my model N[0] would return [3,4,2] I know how to define symmetric 2 dimentional arrays but can't figure out how to do it with various sizes.

I hope the question is clear, if not please kindly let me know.

Thanks

Was it helpful?

Solution

So it turned out this is the right way: if NI is our set this is how you would define the set:

set NI[1]:=3 4 2;
set NI[2]:=4 3 2 2;
set NI[3]:=3 2;
etc
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top