variable bounds for summation

Hello everyone

I am writing a model in Gams in which I need use one of the model variables as the summation bounds
actually i want to write the below equation

sum(t$(t>=s(i)), y(i,t))

where s(i) and y(i,t) are variables

could anyone help me ???


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
You need to specify “i” first, Then I guess “ord” would help.

Date: Wed, 22 Jul 2015 07:04:39 -0700
From: s.javan89@gmail.com
To: gamsworld@googlegroups.com
Subject: variable bounds for summation

Hello everyone

I am writing a model in Gams in which I need use one of the model variables as the summation bounds
actually i want to write the below equation

sum(t$(t>=s(i)), y(i,t))

where s(i) and y(i,t) are variables

could anyone help me ???


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.

How can index t can be greater than variable s(i) ? You can not compare index with variable.
I think you want to say add in terms of index “t” only when index “t” is greater than index “i” if yes then you can use

EQUA1(i)…SUM(t$(ORD(t)>=(ORD(i)) y(i,t)…

Regards,
Owais Nooruddin

+358465700556

2015-07-22 17:04 GMT+03:00 Shima Javan :

Hello everyone

I am writing a model in Gams in which I need use one of the model variables as the summation bounds
actually i want to write the below equation

sum(t$(t>=s(i)), y(i,t))

where s(i) and y(i,t) are variables

could anyone help me ???


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.