|
TABLE format is used to enter items that are dependent on two more sets. The general format is
Table itemname(setone, settwo ... ) descriptive text
set_2_element_1 set_2_element_2
set_1_element_1 value_11 value_12
set_1_element_2 value_21 value_22;
Examples:
TABLE a(i,j) crop data
corn wheat cotton
land 1 1 1
labor 6 4 8 ;
Table intercepts(curvetype,commodities)
corn wheat
demand 4 8
supply 1 2;
table slopes(curvetype,commodities,commodities)
corn wheat
demand.corn -.3 -.1
demand.wheat -.07 -.4
supply.corn .5 .1
supply.wheat .1 .3 ;
Notes:
| • | Alignment is important. Each numerical entry must occur somewhere below one and only one column name in the Table. |
| • | All elements that are not given explicit values or have blanks under them are implicitly assigned to equal zero. |
| • | Items in tables must be defined with respect to at least 2 sets and can be defined over up to 20 sets. When more than two dimensional items are entered, as in the equilibrium example, periods(.) set off the element names set1elementname.set2elementname.set3elementname etc. |
| • | Tables are a specific input entry format for the general GAMS parameter class of items that also encompasses scalars. |
| • | More on tables appears in the Data Entry chapter. |
|