Search found 2 matches

by anonyms14225
3 years ago
Forum: Syntax
Topic: limited sums
Replies: 3
Views: 8393

Re: limited sums

Thank you for this heads up! But, my question was unclear, i meant to ask how to add "for all i's & j's" to my model. Normally i use sum((i, j), y(i, j, k,)) but since it is limited i don't know how to do it.
by anonyms14225
3 years ago
Forum: Syntax
Topic: limited sums
Replies: 3
Views: 8393

limited sums

Hi,

I have a binary variable y(i,j,k) and i want to add this constraint:

y(i,j,k)+y(i,j,k+1)+y(i,j,k+2) =l= 1; for all i's and j's.

For example
y(1,1,1)+y(1,1,2)+y(1,1,3)<=1;

I'm new to GAMS, sorry if that's a rather silly question