This document describes an installation procedure of the GTAP4inGAMS package. There are two versions of the GTAP datasets in the package: the full versions (the file gtap001.zip for the GTAPinGAMS and the file aspen.zip for the GTAP-EG) and the aggregated versions (the file gtap_small.zip for the GTAPinGAMS and the file aspen_small.zip for the GTAP-EG). The full versions of the datasets have a restricted distribution. In order to use the full versions, a modeller needs to obtain the standard GTAP4 data file gsddat.har. The instructions for obtaining the GTAP data can be found at the GTAP Homepage . For testing purposes, aggregated versions of the GTAPinGAMS and GTAP-EG datasets are provided with the GTAP4inGAMS package. The GTAP4inGAMS package with the aggregated datasets can be downloaded here (free of charge). A modeller can test the aggregated datasets by running illustrative models. The modeller can change the models to suit his specific purpose because he has a full access to the code of the build routines and the models.
In order to use the GTAP4inGAMS package, you need to have the following GAMS system components:
The GTAP4inGAMS package is distributed in a zip archive (a file gtapgams.zip). You can download it from ../gtap/gtapgams.zip. The archive has the directory structure presented below.
|BUILD||build||aspen.bat||Batch file to build the GTAP-EG dataset|
|dataset||build.bat||Batch file to build the GTAPinGAMS dataset|
|chkdata.bat||Check benchmark data|
|chkdata.gms||Check benchmark data|
|gtapaggr.gms||Aggregation GAMS file|
|gtapsets.gms||Make sets for aggregation|
|ieo.dat||IEO Projections Data|
|impose.bat||New dataset creation|
|impose.gms||New dataset creation|
|relabel.gms||Relabel to GAMS format|
|seehar.exe||Read HAR-file utility|
|DATA||initial and||vail.dat||Aggregated Energy Data|
|resulting||aspen_small.zip||13x8 GTAP-EG dataset|
|data||gtap_small.zip||10x10 GTAPinGAMS dataset|
|(gsddat.har)||GTAP Data (not included)|
|(aspen.zip)||Created after running ASPEN.BAT|
|(gtap001.zip)||Created after running BUILD.BAT|
|DEFINES||stores||aspen.map||Full GTAP-EG mapping|
|.set, .map, and .def||aspen.set||Full GTAP-EG sets|
|files||aspen_small.map||13x8 GTAP-EG mapping|
|aspen_small.set||13x8 GTAP-EG sets|
|gtap_small.map||10x10 GTAPinGAMS sets|
|gtap_small.set||10x10 GTAPinGAMS sets|
|notax.def||New tax rates definitions|
|gams2har.gms||Move to HAR format|
|gams2prm.gms||Move to GAMS parameter|
|gams2tbl.gms||Move to table|
|gams2txt.gms||Move to text file|
|har2gams.gms||Move from HAR format|
|mrtdata.gms||GTAP parameters calculation|
|MODELS||Illustrative||gtap-eg.gms||The GTAP-EG Model|
|models||runall.bat||Run all GTAPinGAMS Models|
|mrttest.gms||Test all GTAPinGAMS Models|
|cnstest.gms||Test CNS GTAPinGAMS Model|
|mcptest.gms||Test MCP GTAPinGAMS Model|
|mgetest.gms||Test MPSGE GTAPinGAMS Model|
|nlptest.gms||Test NLP GTAPinGAMS Model|
|mrtcns.gms||CNS GTAPinGAMS Model|
|mrtmcp.gms||MCP GTAPinGAMS Model|
|mrtmge.gms||MPSGE GTAPinGAMS Model|
|mrtnlp.gms||NLP GTAPinGAMS Model|
To install the GTAP4inGAMS package:
To create the full version of the GTAPinGAMS dataset:
To create the full version of the GTAP-EG dataset:
The GTAP4inGAMS dataset is built on the standard GTAP4 database, which is not distributed freely. In order to construct the full GTAP datasets, a user needs to contact GTAP to obtain the GTAP4 dataset (the file gsddat.har).
The file gsddat.har should be placed into the DATA subdirectory of the GTAPinGAMS package. To create the full version of the GTAPinGAMS, a user needs to run build.bat file. For this, in MS-DOS prompt (make sure that you are connected to a proper directory) type build and press Enter. Run time on Pentium 500 is about 8 minutes (Make sure that GAMS is included in the PATH variable of your computer's MS-DOS. To check it, in MS-DOS prompt type path and press Enter).
The file build.bat is intended to:
The GTAP-EG dataset is built on the standard GTAP4 database and calibrated to energy quantity and price data. In order to construct the full GTAP-EG dataset, a user needs to run aspen.bat file. For this, In MS-DOS prompt, type aspen and press Enter. Run time on Pentium 500 is about 4 minutes. If the full version of the GTAPinGAMS dataset has not been created yet, then the BUILD routine (described above) will be automatically called.
The file aspen.bat is intended to:
Users can edit aspen.bat to suit their specific applications. In particular, a pause option can be uncommented for every step to see all the stages of the dataset creation (To uncomment a pause command, delete a :(column) sign, i.e. change a line from :pause to pause.). The original build routine has a pause in one place only - before the aggregation and running the illustrative model. At this point, in MS-DOS window you'll see a message:
Aggregate to 13x8, include energy projections and create aspen_small.zip Will aggregate to aspen_small.zip: Press any key to continue . . .
If you press any key, then in addition to the full dataset an aggregated dataset will be created (a new file aspen_small.zip will replace an old one) and an illustrative model will run on an aggregated data. If you press ``Ctrl-C'', then the following message appears.
Terminate batch job (y/n)?
If you terminate the batch job at this time (by pressing ``y'' and then ``Enter''), aspen.bat will stop and only the full version of the GTAP-EG dataset will be created and placed into DATA subdirectory under the name aspen.zip.
In the process of building the dataset, several echo files are placed in the ASPEN subdirectory:
The GTAP4inGAMS package contains the aggregated versions of the GTAPinGAMS dataset and the GTAP-EG dataset. They are provided for testing purposes.
A user can check the installation by running the models on the aggregated GTAPinGAMS dataset (file gtap_small.zip), which is located in the DATA subdirectory and ready to use. The gtap_small.zip archive contains the data file gtap_small.gms, and associated SET and MAP files. The aggregated GTAPinGAMS dataset has 10 sectors, 10 regions, and 5 factors of production. Aggregate regions in the model include the US, Japan, the EU and China, Other OECD, Former Soviet Union, Central European Associates, Other Asia, Mexico plus OPEC and Rest of World. Commodities in the dataset include the investment aggregate, five energy goods, metals-related industry, other energy-intensive industries, other manufactures and services. For more information, read the GTAP4inGAMS description.
The gtapgams.zip archive also contains an aggregated version of the GTAP-EG dataset. It is located in DATA subdirectory and named aspen_small.zip. The archive contains the data file aspen_small.gms, and associated SET and MAP files. The aggregated dataset has 13 regions, 8 goods, and two primary factors. The identifiers for the aggregated GTAP-EG dataset are contained in the SET file. For more information, read the GTAP4inGAMS description.
Once you have built the initial GTAPinGAMS or GTAP-EG dataset, you can begin to think about a particular application and which aggregations of the original GTAP-EG data would be appropriate for studying those issues. Typically it is useful to create two aggregations for any new model, one with a minimal number of regions and commodities and another with a larger number of dimensions. The small aggregation can then be used for model development.
The gtapaggr.bat program is used to aggregate the GTAPinGAMS and the GTAP-EG datasets. A command line argument defines the name of the target aggregation. You only need to provide the batch file with the target because the target's mapping file defines the source. Before running gtapaggr.bat, you must create two files, one defining the sets of commodities, regions and primary factors in the target dataset, and another defining the name of the source dataset and a correspondence between elements of the source and target. The aggregation routine produces a brief report of GDP and trade shares in the new dataset. The SET and MAP files for a new dataset are GAMS-readable files located in the DEFINES subdirectory. For more information, click here.
Back to GTAPinGAMS Homepage
Maintained by Sergey Paltsev
Last Updated 01/23/01