I have problem in which I want to decide whether to install new plants( n numbers) at a location to meet my demands in that region.

I am using a binary to decide whether to install or not in a given year.

y(n,t) is the variable to decide on whether a nth plant is installed in t th year.

But, I don’t what’s the number of the plants needed.So how can I define n which is not a known number.I mean the n changes with the demand,i.e,the number of plants needed may be 1,2,3, or so on… So how I can define n in which n is changing with the demand.

Finally I have to find how many plants are needed because each plant has a maximum production capacity constraint

Is it related to dynamic sets/ ? or do I need to use a loop?

Please help

Many thanks in advance