summing different sets

hi guys
as you can see below, i want to sum different sets as one of the sets which i declared. i do not know which of the logical expressions i need to use.

set a /sg, cr, pt, bf, ag,…, sga, cra,pta,bfa,aga,…V,Y,Z,X/
set b(a) /sg, cr, pt, bf, ag/
set c(a) /sga, cra,pta,bfa,aga/

alias (a,aa), (b,bb), (c,cc)


Q(b) = V(b) + Y(b)+Z(b)+sum(cc, X(c,cc))

(error code 149)

thanks

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Volkan


You use the set c on the right side of the equality sign, but you don’t tell Gams what to do with it: it doesn’t appear on the left side (e.g. Q(b,c)) or is used in a sum on the right hand side.

The equation would be correct if you write it as Q(b,c) …



Cheers

Rneger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Volkan Bektas
Sent: Montag, 16. September 2013 15:15
To: gamsworld@googlegroups.com
Subject: summing different sets



hi guys

as you can see below, i want to sum different sets as one of the sets which i declared. i do not know which of the logical expressions i need to use.



set a /sg, cr, pt, bf, ag,…, sga, cra,pta,bfa,aga,…V,Y,Z,X/

set b(a) /sg, cr, pt, bf, ag/

set c(a) /sga, cra,pta,bfa,aga/



alias (a,aa), (b,bb), (c,cc)





Q(b) = V(b) + Y(b)+Z(b)+sum(cc, X(c,cc))



(error code 149)



thanks




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.