problems with the implementation of a constraint

Hi,

Could anyone help with the implementation of the constraint that is given below? I was trying to use dollar operator but it did not work. Any ideas would be greatly appreciated.

sum(t in [t-x,t], s(t)) <= u(t) , for all t in /1*36/

where
Set
t Hours /1*36/
Parameter
x
Variables
s(t)
u(t)

So the summation is from t-x (x is a constant) to t. This constraint should be satisfied for all t in /1*36/.

Thank you,
Best regards,
Alice


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hi Alicja



How about this:



Alias(t,tt);



eq1(t)… sum(tt$(ord(tt) gt ord(t)), s(tt-x)) =L= U(t);



Cheers



Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von alicja.lojowska@gmail.com
Gesendet: Dienstag, 12. Februar 2013 21:27
An: gamsworld@googlegroups.com
Betreff: problems with the implementation of a constraint




Hi,

Could anyone help with the implementation of the constraint that is given below? I was trying to use dollar operator but it did not work. Any ideas would be greatly appreciated.

sum(t in [t-x,t], s(t)) <= u(t) , for all t in /1*36/

where
Set
t Hours /1*36/
Parameter
x
Variables
s(t)
u(t)

So the summation is from t-x (x is a constant) to t. This constraint should be satisfied for all t in /1*36/.

Thank you,
Best regards,
Alice


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?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\