|
Set declaration |
Top Previous Next |
|
In order to use any set one must first declare it. In its most complete form the set declaration contains
The general format for the set declaration and element definition statement is:
SET setname optional explanatory text / first set element name Optional explanatory text second set element name Optional explanatory text … /; or SETs setname optional explanatory text / first set element name Optional explanatory text second set element name Optional explanatory text … /; Examples: (sets.gms) SETs j /x1,x2,x3/ SET PROCESS PRODUCTION PROCESSES /X1,X2,X3/; SET commodities Crop commodities / corn in bushels Wheat in metric tons milk in pounds cost "cost/unit" "long-complex-*&$name" 'element name'/ ; Set jj(j) set to b e computed later without entries ; $onmulti set i additional entries for i /i1,i2/; set composite(i,j) mullltidimentsional /r1.set.j/; set kk kk has all of i and j in it /set.i,set.j/; Notes:
|