controling equations with subsets

Problems with syntax of GAMS
Post Reply
Manassaldi
User
User
Posts: 118
Joined: 7 years ago
Location: Rosario - Argentina

Re: controling equations with subsets

Post by Manassaldi »

Hi, I hope this can help you.
Bye

constraint(technology)$subset_of_tech(technology).. var(technology) =g= par(technology);
Manassaldi
User
User
Posts: 118
Joined: 7 years ago
Location: Rosario - Argentina

Re: controling equations with subsets

Post by Manassaldi »

Hi, you must always reference to the original set (i, j)

for example:

set
i /i1*i10/
j /j1*j15/
h /h1*h40/
technology(i,j)
subset_of_tech(i,j)
;
technology(i,j)= some set definition
subset_of_tech(i,j)= some set definition

constraint(i,j,h)$(technology(i,j) and subset_of_tech(technology)).. var(i,j,h) =g= par(i,j,h);

equation "constraint" applies to all pairs of values of (i, j) that belong to the subset "technology" and "subset_of_tech" and for all set h.
This happens because the "and" between the two subsets was used

Bye!
Post Reply