Dear Friend,
source(i)… sum(j, cp(i,j)) =e= sc(i)
After solving above equation I will get i*j matrix. But I wanted upper triangular matrix. i.e i varies 1to n and j should vary i to m.
How it will be written in GAMS. please let me know…
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/iJv0uabJg54J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
Hi
You just have to control the index j in the sum, so that its “ordinal” is larger or equal to i.
This can be achieved by a dollar-control such as :
source(i) … sum(j $(ord(j) ge ord(i)), cp(i,j)) =e= sc(i) ;
I hope this solves your problem.
cheers
Le vendredi 14 septembre 2012 09:39:00 UTC+2, Mukund Bade a écrit :
Dear Friend,
source(i)… sum(j, cp(i,j)) =e= sc(i)
After solving above equation I will get i*j matrix. But I wanted upper triangular matrix. i.e i varies 1to n and j should vary i to m.
How it will be written in GAMS. please let me know…
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/wiqZUeHA1CgJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
Hello Dax,
Thanks a lot you have saved lot time of my, searching as well solution.
Thanks, best wishes,
On Saturday, September 15, 2012 2:33:54 PM UTC+5:30, Dax wrote:
Hi
You just have to control the index j in the sum, so that its “ordinal” is larger or equal to i.
This can be achieved by a dollar-control such as :
source(i) … sum(j $(ord(j) ge ord(i)), cp(i,j)) =e= sc(i) ;
I hope this solves your problem.
cheers
Le vendredi 14 septembre 2012 09:39:00 UTC+2, Mukund Bade a écrit :
Dear Friend,
source(i)… sum(j, cp(i,j)) =e= sc(i)
After solving above equation I will get i*j matrix. But I wanted upper triangular matrix. i.e i varies 1to n and j should vary i to m.
How it will be written in GAMS. please let me know…
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/rYHEOxULRUQJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.