How to Read Results in a .LST File

Download a PDF version of this how-to guide here:  How to Read Results in a .LST File (PDF document534.1 KB)

1.  What is the Listing File?

Every time a GAMS model is run, it generates an output file called the listing file.  The file has the suffix “.lst” and the file name is the same as that of the model.  For example, when you run the model “UNI-CGE10.GMS,” the listing file will be named “UNI-CGE10.lst”. 

2.  Where is the .LST File?  

The .lst file opens automatically if you have selected the appropriate setting in GAMS.  In GAMS, click on the settings icon the upper menu bar (Figure 1.) A settings box will open.  Place a check in the option “Open .lst file after running GAMS” and then click on “Apply”.


Figure 1.  Setting for Viewing the .LST file

 

Now run the UNI-CGE model – the UNI-CGE.gms file.  Click on that file name in the menu bar, then click on the green arrow, circled in green in Figure 2.  As the model solves, a process log opens on the right side of the screen. The log tells you whether the model has solved successfully. In this example the model solves successfully, as reported in the line of code circled in red.  If the model fails to solve, the process log will identify the errors you must correct.

When the model has finished running, the .gms file in the viewing frame will be automatically replaced by the .lst file.  You can now toggle between the .gms model code and the .lst file. You can leave the .lst file open because it will be overwritten with new model results every time you run the .GMS model. 

Figure 2.  GAMS model, process file and .lst file

3. Locate and View Results in .LST File

The .lst file prints any item for which there is a “display” command in the GAMS model.  Figure 3 shows an example of a command in the GAMS file to display the elasticity “ESUBQ,” the domestic-import substitution elasticity. 

Figure 3.  GAMS code to command a display in the .lst file

You can also define new elements that are not in the GAMS model and command that they be displayed in the .lst file. As an example, we create and define a parameter named “NewElementc,a” the cost of each commodity C used as an intermediate input by production activity A. We define NewElement as price times quantity (PQc,a * QINTCAc,a).  After defining the element, we add the command to display it.

After running the model, find an element that is displayed in the .lst file by typing the command: Control + F.  This will open a search box, in which you input the name of the element you want to find.  In Figure 4, we search for ESUBQ. If there are many instances of ESUBQ in the .lst file that you want to view, you can click on the “Find All” option.  You can also search for each instance by clicking on the forward and backward buttons.  

Figure 4.  Search for an element in the .lst file

The search will take you to the element that you commanded GAMS to display in the .lst file.  In Figure 5, both ESUBQ and NewElement parameters are displayed in the .lst file. 

Figure 5.  Elements are displayed in the .lst file      

4. Key Results in the LST File 

The UNI-CGE model code includes commands to organize key results into tables and display them. You can search for these tables and variables in the .lst file after you carry out a model experiment. Table 1 provides a summary of the tables and their contents.

NAME – Search term

Content

Res_QCOM_pc

% change in commodity quantities (production, consumption, trade)

Res_PCOM_pc

% change in commodity prices

Res_PROD_pc

% change in production quantity and value added

Res_SCAL_pc

% change in scalar values (macro variables)

RGTAPtab_pc

% change in real GDP

FACT_pc

% change in factor results

QF_pc

% change in factor quantities by factor and activity

WFA_pc

% change in factor price distortion by factor and activity

CTAXR_B

Base commodity tax rates (sales, export and import taxes)

CTAXR_L

Updated commodity tax rates (sales, export and import taxes)

ATAXR_B

Base activity output tax rates

ATAXR_L

Updated activity output tax rates

YTAXR_B

Base income tax rate

YTAXR_L

Updated income tax rate

 

Copyright Cornerstone CGE CC 4.0 BY-NC-SA


Last modified: Friday, 6 September 2024, 8:55 PM