Set with dynamic size

Hello,

Please I need support to develop a parameter of 3 sets P(t,c,b).

Set
t /t1 t5/
c /c1 c10/
b / set with dynamic size, it depends on a randomly generated parameter e.g. H(t,c)=uniform(100,200) /

Parameter H(t,c)
Parameter P(t,c,b)


P(t,c,b)= round(uniform(0,1));


Thanks a lot for your support.

Hi

If I understand you correctly, the size can have any number of elements between 100 and 200, e.g. /1*167/.

If that is what you mean, you could do this as follows:

* Define a maximum set
set n /1*200/;

parameter sizeb Size of dynamic set;

sizeb = uniformInt(100,200)

set b(n) Dynamic set;

b(n)$(n.val < sizeb+1) = yes;

display b;

You can “empty” the set by writing b(n) = NO;
Hope this helps.
Cheers
Renger