How can I code a backward summation in GAMS for the formula below. (summing over k backwards from j to 1)
\
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 ??
First I should read the guidelines to this forum and post your question properly (and at least put your name somewhere).
Here is a piece of code that does this kind of summation. I suppose you can adjust this for your problem
set k /110/, j /115/;
parameter sumj(j), dummy(k,j);
\
dummy(k,j) = ord(k) + ord(j);
sumj(j) = sum(k$(ord(k) < ord(j)), dummy(k,j));
display sumj;
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of fdabab2@uic.edu
Sent: Donnerstag, 21. Mai 2015 20:07
To: gamsworld@googlegroups.com
Subject: Backward Summation
How can I code a backward summation in GAMS for the formula below. (summing over k backwards from j to 1)
\
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.