sum

Problems with modeling
Post Reply
Omi
User
User
Posts: 7
Joined: 4 years ago

sum

Post by Omi »

how to code constraint 15 in the attachment?
where x(i,t) is variable.
Attachments
1.PNG
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: sum

Post by Renger »

Hi

Once again use $-constraints to restrain the sum

Code: Select all

sum(k$(ord(k) > 1), 1/x(k)
If the set k has numbers as set elements (e.g. /1*10/) you can use k.val instead of ord.
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply