« Return to Thread: [AMPL 2631] Arbitrary Cartesian Products

[AMPL 2631] Arbitrary Cartesian Products

by Guilherme Freitas :: Rate this Message:

Reply to Author | View in Thread


Hi  everybody. I need to evaluate a function over a set like this:

{ (r_1, ..., r_L)  :  r_1 <= n_1, ..., r_L <= n_L  and  sum {i in
1, ..., L} r_i = k }

where L, n1, ..., n_L and k are positive integers ('params') defined
by data. The problem is that I don't know how to write the set above
in AMPL. I looked in the book for a while, but couldn't find anything
helpful. I would be very grateful if someone could point out the page
in the book where this is explained or post the code to write this
set.

Thanks in advance,

--Guilherme Freitas

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: [AMPL 2631] Arbitrary Cartesian Products