How to express a double summation

419 views
Skip to first unread message

Angelina27

unread,
May 29, 2018, 11:56:03 AM5/29/18
to AIMMS - The Modeling System
Hello, I'm fairly new to AIMMS and was wondering what the correct syntax is for a double summation.
Can you just use sum[i, sum[j, expression to be summed]]?  Or is there another way entirely?
Thanks 

Alexandru Toader

unread,
May 29, 2018, 2:12:08 PM5/29/18
to ai...@googlegroups.com
A way is :
First define a parameter/variable(etc) called TYT(j) , for example,with definition sum (i,ExpressionThanYouWantTheDoubleSomatori (i, j))
after define an other parameter/etc ResultDoubleSomatori with definition sum (j, TYT (j))

Alex


Il Mar, 29 Mag, 2018 alle 17:56, Angelina27
<angela...@gmail.com> ha scritto:
Hello, I'm fairly new to AIMMS and was wondering what the correct syntax is for a double summation.
Can you just use sum[i, sum[j, expression to be summed]]?  Or is there another way entirely?
Thanks 

--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aimms+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohan

unread,
May 29, 2018, 2:13:12 PM5/29/18
to AIMMS - The Modeling System
Hello, 

You can simply write sum[(i,j), Expression to be summed] and the expression will be double summed over both i and j. 
Reply all
Reply to author
Forward
0 new messages