|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[AMPL 2901] Summation Index Notation for i > jI have a quick syntax question regarding AMPL programming. If I have a set, say {profit} and I want to do an operation such as: sum {j in profit, i in profit} 2 * Covariance [j,i] but ONLY for j > i. How do I incorporate this constraint into the model? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
|||||
|
|
[AMPL 2902] Re: Summation Index Notation for i > jTry sum {j in profit, i in profit: j > i} 2 * Covariance [j,i] Best, P On Oct 21, 11:10 pm, Emily Heeb <emily.h...@...> wrote: > I have a quick syntax question regarding AMPL programming. If I have a > set, say {profit} and I want to do an operation such as: > > sum {j in profit, i in profit} 2 * Covariance [j,i] > > but ONLY for j > i. > > How do I incorporate this constraint into the model? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
|||||
|
|
[AMPL 2903] Re: Summation Index Notation for i > jOne labourious way is in the way you treat your data i.e. remove symmetry by entrying zero values on the other side of the diagonal and allow your sum over the entire metric /Gideon Emily Heeb skrev: > I have a quick syntax question regarding AMPL programming. If I have a > set, say {profit} and I want to do an operation such as: > > > sum {j in profit, i in profit} 2 * Covariance [j,i] > > but ONLY for j > i. > > How do I incorporate this constraint into the model? > > > > > -- Gideon Mbiydzenyuy PhD Candidate, e-Transactions, Avdelningen för programvarusystem, Dept. of Systems and Software Eng., Sektionen för teknik School of Engineering, Blekinge Tekniska Högskola Blekinge Institute of Technology Box 214 SE - 374 24 Karlshamn Sweden Tel: +46 454 385904 (Karlshamn) Tel: +46 457 385897 (Ronneby) Mob: +46 768 856713 Fax: +46 454 191 04 (Karlshamn) Homepage: http://www.bth.se/tek/gmb --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To post to this group, send email to ampl@... To unsubscribe from this group, send email to ampl+unsubscribe@... For more options, visit this group at http://groups.google.com/group/ampl?hl=en -~----------~----~----~----~------~----~------~--~--- |
|||||
|
|
[AMPL 2906] Re: Summation Index Notation for i > j
|