union of subsets Topic is solved

Problems with syntax of GAMS
Post Reply
Bahar_Mdi
User
User
Posts: 21
Joined: 4 years ago

union of subsets

Post by Bahar_Mdi »

Dear all,
how do I union some subsets in my model?
consider the following sets and subsets:

SETS

i/0*7/

subV_T(i) /1*3/
subV_DE(i) /4/
subV_DO(i) /5/

I want to define a new subset which is the union of subV_T and subV_DO. How can I do this? I do it the same as what is expressed for the union of sets but I get an error.

I appreciate it if someone can help me.
Thanks and regards,
Bahar
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: union of subsets

Post by abhosekar »

Just define it as a subset and then assign it using the definition of unit as follows:
set
union_set(i);

union_set(i)$(subV_T(i) or subV_DO(i)) = yes;

Hope this helps.

- Atharv
Post Reply