How to write MAX(...) expression

Problems with syntax of GAMS
Post Reply
Nikou
User
User
Posts: 33
Joined: 4 years ago

How to write MAX(...) expression

Post by Nikou »

I would like to express the following in GAMS using its MAX(x1,x2,...,xn) function.

max {B(i,j)¦i in Ij} for all valid combinations of (i,j) where i={i1,i2,...,in}, j={j1,j2,...,jk).

So, the GAMS-determined result could be something like this

MAX(B(i1,j1), B(i2,j1), B(i5,j1)) =l= ...
MAX(B(i1,j2), B(i3,j2), B(i4,j2), B(i6,j2)) =l=...
MAX(B(i3,j3), B(i5,j3)) =l=...
...

Is there a way to do this in GAMS?
Nikou
User
User
Posts: 33
Joined: 4 years ago

Re: How to write MAX(...) expression

Post by Nikou »

This is exactly what I needed.

Thank you very much!
Post Reply