How do I enter this objective function into GAMS?

Here is some untested code.

alias(i, ii);

objective =e= sum(i, x(i)*(w(i) + log(P) + log(x/(sum(ii, x(ii)))) ));

- Atharv

Would the w(i) work even though they’re given as constants?

I assumed w(i) is a parameter. You can certainly define parameters over sets.