Page 1 of 1

dynamic set or loop needed.?

Posted: Tue May 19, 2020 1:38 pm
by ibruchem
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

Re: dynamic set or loop needed.?

Posted: Wed May 20, 2020 7:25 am
by bussieck
You either find a reasonable upper bound for the maximum number of plants to be installed in every year or you switch binary y(n,t) to an integer variable y(t). Since you haven't done this you probably have some characteristics (e.g. cost, capacity, ..) that distinguish the nth from the (n+1)th plant. I guess the number of configurations is finite (and small) and you could have a mix of n binaries and an integer variable for the rest with the last configuration.

Good luck,
-Michael

Re: dynamic set or loop needed.?

Posted: Thu May 21, 2020 2:03 am
by ibruchem
Many thanks Michael..Let me start thinking in that way.!