Hi Swapnil

You could add -conditions on the right side while keeping just one equation (assuming that the set of houses is /one, two, three, four/).
\
\
\
house(i,t) .. A(i,t) =e= A(i,t-1)-sum(j,B(i,j,t))-(C('two',t)+ D('two'))(ord(i) eq 1)- D(‘four’)$(ord(i) eq 2) ;

In the case of house â€œoneâ€ only the term C(â€œtwoâ€,t) + D(â€œtwoâ€) is subtracted. In the case of house â€œtwoâ€ the term D(â€œfourâ€) is subtracted.

You could also use $samesas(i, â€œoneâ€) and $sameas(i,â€two)

Cheers

Renger

From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Swapnil Rayal

Sent: Dienstag, 3. November 2015 07:50

To: gamsworld

Subject: Re: symbolic equation redefined

Hey…

I have been facing the same problem…

Hopefully you might have figure out by now… Can you tell me how to resolve this same problem…

Thanx

On Sunday, March 15, 2015 at 6:02:50 PM UTC+5:30, Anna Cisneros wrote:

HI! I am quite new to GAMS,

I want to write an equation, but the equation is different for different index. I’ve tried something like this, but GAMS seems to deny a specific index in an equation, does anyone know to go around this?

Code:

house (i,t) consumption house i hour t ;

house(‘one’,t) … A(‘one’,t) =e= A(‘one’,t-1)±sum(j,B(‘one’,j,t))-C(‘two’,t)+D(‘two’);

house(‘two’,t) … A(‘two’,t) =e= A(‘two’,t-1)±sum(j,B(‘two’,j,t))-D(‘four’);

when i do this i get error 150 “Symbolic equation redefined”

thank you!

–

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/d/optout.

–

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/d/optout.