|
Using subsets |
Top Previous Next |
|
There may be cases where one wishes to reference a priori known or calculated subsets. In such case, one may define a subset, either explicitly or through calculation, then reference the item with respect to that subset. Consider the following example. (sets.gms)
Set wherea(thisI); Wherea(thisi)$a(thisi)=yes; Parameter nzz(thisi); nZz(thisi)=5; nZz(wherea)=-1; nZz(thisj)=12;
In this case, the blue colored statements operate over subsets of thisI with the wherea reference being over a calculated subset and the thisj reference being over an explicitly defined subset. |