27.10.2013 Views

Quick start - Gams

Quick start - Gams

Quick start - Gams

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Alias<br />

One device used in the economic equilibrium formulation is the so called alias command that<br />

allows us to have a second name for the same set allowing us in that case to consider both the<br />

effects of own and cross commodity quantity on the demand and supply price for an item. Then<br />

general form of an Alias is<br />

ALIAS(knownset,newset1,newset2,...);<br />

where each of the new sets will refer to the same elements as in the existing knownset.<br />

More on alias appears in the Sets chapter.<br />

Data entry<br />

GAMS provides for three forms of data entry. These involve PARAMETER, SCALAR and<br />

TABLE formats. Scalar entry is for scalars, Parameter generally for vectors and Table for<br />

matrices. Above I needed data for vectors and matrices but not a scalar. Nevertheless I will<br />

cover all three forms.<br />

Scalars<br />

SCALAR format is used to enter items that are not defined with respect to sets.<br />

scalar item1name optional labeling text /numerical value/<br />

item2name optional labeling text /numerical value/<br />

... ;<br />

Examples include<br />

scalar dataitem /100/;<br />

scalar landonfarm total arable acres /100/;<br />

scalars landonfarm /100/<br />

pricecorn 1992 corn price per bushel /2.20/;<br />

Scalars are covered in more depth in the Data Entry chapter.<br />

Parameters<br />

Parameter format is used to enter items defined with respect to sets. Generally parameter format<br />

is used with data items that are one-dimensional (vectors) although multidimensional cases can<br />

be entered. The general format for parameter entry is:<br />

Parameter itemname(setdependency) optional text<br />

/ firstsetelementname associated value,<br />

secondsetelementname associated value,<br />

Courtesy of B.A. McCarl, October 2002 28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!