SUMMATION and Controlled indices

Hi Everyone!

I am trying to optimize the energy consumption of a system while taking into account the heat that is added to the room. For this i need to take into account the radiant heat that is effected by heat produced in previous intervals.

I am trying to do a summation of a controlled index (j= time interval) to try to achieve the following equation output.


set i=1 and A,b,c,s= constants

C(j=1)= (Abc)x(j=1,i=1)+(Ab*(1-c)s1)x(j=1,i=1)
C(j=2)=(A
b
c)x(j=2,i=1)+(Ab*(1-c)s1)x(j=2,i=1)+((Ab(1-c)s2))x(j=1,i=1)
C(j=3)=(A
b
c)x(j=3,i=1)+(Ab*(1-c)s1)x(j=3,i=1)+((Ab(1-c)s2))x(j=2,i=1)+((Ab(1-c)*s3))*x(j=1,i=1).

I have tried alias-ing j with jjj however jjj only takes the current value of j and not the previous one even though i m trying to sum over

\

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.

Hi Fadwa



I assume that s is a parameter: s(j) instead of using s1, s2, and s3

I am not sure why x(j,i) is indexed over i as you only use x=1, but I left it as it is:

Alias(j,jj);

C(j) = sum(i$(ord(i) =1), A * b * c * x(j,i)) + A * b * (1-c) * sum(jj$(ord(jj) le ord(j), s(jj) * x(jj,i));



Cheers

Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von fadwa dababneh
Gesendet: Samstag, 20. Juni 2015 19:55
An: gamsworld@googlegroups.com
Betreff: SUMMATION and Controlled indices



Hi Everyone!



I am trying to optimize the energy consumption of a system while taking into account the heat that is added to the room. For this i need to take into account the radiant heat that is effected by heat produced in previous intervals.



I am trying to do a summation of a controlled index (j= time interval) to try to achieve the following equation output.





set i=1 and A,b,c,s= constants



C(j=1)= (Abc)x(j=1,i=1)+(Ab*(1-c)*s1)*x(j=1,i=1)

C(j=2)=(Abc)x(j=2,i=1)+(Ab*(1-c)s1)x(j=2,i=1)+((Ab(1-c)*s2))*x(j=1,i=1)

C(j=3)=(Abc)x(j=3,i=1)+(Ab*(1-c)s1)x(j=3,i=1)+((Ab(1-c)s2))x(j=2,i=1)+((Ab(1-c)*s3))*x(j=1,i=1).



I have tried alias-ing j with jjj however jjj only takes the current value of j and not the previous one even though i m trying to sum over




\

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.

Dear Renger,

Thank you so much this was a great help!

Best Wishes,
Fadwa

On Monday, June 22, 2015 at 1:14:07 AM UTC-5, Renger van Nieuwkoop wrote:

Hi Fadwa



I assume that s is a parameter: s(j) instead of using s1, s2, and s3

I am not sure why x(j,i) is indexed over i as you only use x=1, but I left it as it is:

Alias(j,jj);

C(j) = sum(i$(ord(i) =1), A * b * c * x(j,i)) + A * b * (1-c) * sum(jj$(ord(jj) le ord(j), s(jj) * x(jj,i));



Cheers

Renger



Von: gams...@googlegroups.com [mailto:gams...@googlegroups.com] Im Auftrag von fadwa dababneh
Gesendet: Samstag, 20. Juni 2015 19:55
An: gams...@googlegroups.com
Betreff: SUMMATION and Controlled indices



Hi Everyone!



I am trying to optimize the energy consumption of a system while taking into account the heat that is added to the room. For this i need to take into account the radiant heat that is effected by heat produced in previous intervals.



I am trying to do a summation of a controlled index (j= time interval) to try to achieve the following equation output.





set i=1 and A,b,c,s= constants



C(j=1)= (Abc)x(j=1,i=1)+(Ab*(1-c)*s1)*x(j=1,i=1)

C(j=2)=(Abc)x(j=2,i=1)+(Ab*(1-c)s1)x(j=2,i=1)+((Ab(1-c)*s2))*x(j=1,i=1)

C(j=3)=(Abc)x(j=3,i=1)+(Ab*(1-c)s1)x(j=3,i=1)+((Ab(1-c)s2))x(j=2,i=1)+((Ab(1-c)*s3))*x(j=1,i=1).



I have tried alias-ing j with jjj however jjj only takes the current value of j and not the previous one even though i m trying to sum over




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@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.