Single elements

Top  Previous  Next

One can also specify an element name in quotes to cause GAMS to operate over just a single element of a set.  Thus the command

 

x("i344")=4;

 

will only operate over the I344 element of x leaving the rest alone.

Similarly, the definition

 

X("i344")=y("i344") +3;

 

will only define the i344 case of x to equal the i344 case in y plus 3;  The command

 

X(Ii)=y("i344") +3;

 

will set every case of x associated with the entries in Ii to the i344 case of y plus 3.