Saturday, December 6, 2008

Redeclarations in GAMS

> Erwin:
> To my surprise GAMS allows
> variable x,x;
> Any reason for this?

GAMS allows redeclarations of symbols unless there is a contradiction. I.e. one often sees:

variable x(i),y,z;
positive variable x;

This is perfectly legal GAMS. Not allowed is:

positive variable x;
negative variable x;

Your example is allowed as there is no contradiction.