dynamic set or loop needed.?

Problems with syntax of GAMS
Post Reply
ibruchem
User
User
Posts: 3
Joined: 3 years ago

dynamic set or loop needed.?

Post 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
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: dynamic set or loop needed.?

Post 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
ibruchem
User
User
Posts: 3
Joined: 3 years ago

Re: dynamic set or loop needed.?

Post by ibruchem »

Many thanks Michael..Let me start thinking in that way.!
Post Reply