summation over a controled set

Hi everybody,

I’m new to GAMS and have a problem.
I have following equation:
c23(l,c,t)…z(l,c,t)=g=LL(l,c,t) - sum( (k,t) ,S3 (c,k,l,t) ) ;

I need to sum a variable while it is controlled, for example when t=2 , sum from 1 to 2 , when t=5 , sum from 1 to 5.

How can I write this?


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 Shabab
You can use the following code:
Alias(t,tt);
…sum( (k,tt)$(ord(tt) le ord(t),S3 (c,k,l,tt));

Cheers
Renger




sent from my iPad

Am 19.01.2014 um 11:28 schrieb “shahab A” :

Hi everybody,

I’m new to GAMS and have a problem.
I have following equation:
c23(l,c,t)…z(l,c,t)=g=LL(l,c,t) - sum( (k,t) ,S3 (c,k,l,t) ) ;

I need to sum a variable while it is controlled, for example when t=2 , sum from 1 to 2 , when t=5 , sum from 1 to 5.

How can I write this?


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.

Dear Renger,
Tnx alot for your help.
Regards

On Sunday, January 19, 2014 2:29:58 PM UTC+3:30, Renger van Nieuwkoop wrote:

Hi Shabab
You can use the following code:
Alias(t,tt);
…sum( (k,tt)$(ord(tt) le ord(t),S3 (c,k,l,tt));

Cheers
Renger




sent from my iPad

Am 19.01.2014 um 11:28 schrieb “shahab A” :

Hi everybody,

I'm new to GAMS and have a problem.
I have following equation:
c23(l,c,t)..z(l,c,t)=g=LL(l,c,t) - sum( (k,t) ,S3 (c,k,l,t) )  ;

I need to sum a variable while it is controlled, for example when t=2 , sum from 1 to 2 , when t=5 , sum from 1 to 5.

How can I write this?

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